TomCz
(Tom)
August 11, 2020, 3:35pm
1
I want to track a click on
<a href="javascript: void(0);" class="link-72dpi" data-download="" data-original-title="" title="">
TEXT
</a>
But i got this error. In an other Link Click tag i use the click element URL, but not on this. Is it a problem, if an other link click trigger wants to check the click url? How can i prevent this?
2 Likes
Lukas
(Lukas Winkler)
August 11, 2020, 3:51pm
2
Hi,
That sounds a lot like
opened 06:37PM - 01 Sep 19 UTC
closed 10:21PM - 11 Aug 20 UTC
Bug
Hello,
If the preview UI tries to display a data structure with a circular stru⌠cture it fails at JSON encoding, an uncaught exception gets thrown and the UI doesn't update.
This can happen for example in the following setting:
- define an `AllElementsClick` trigger
- open the tracked website in debug / preview mode
- give an element on the page a reference to itself, e.g. `el.selfref = el;`
- click that element
- `mtm.clickElement` will be pushed to the datalayer
- And here is what I assume is happening: the preview UI tries to JSON encode the datalayer to display it and fails due to the circular structure caused by the self reference.
Of course the given example is a bit silly, however for example when a UI framework that binds a circular structure to the element is used this becomes an issue.
For instance, vue binds a `__vue__` property to the root element of a component from which a circular structure is given via `__vue__.$el`.
It would be great if you could test the patch and report back so that it can be merged:
matomo-org:master
â matomo-org:185
opened 10:29PM - 01 Sep 19 UTC
TomCz
(Tom)
August 11, 2020, 4:22pm
3
I am using the Matomo Cloud. Cannot change the source code.
1 Like
Lukas
(Lukas Winkler)
August 11, 2020, 4:27pm
4
In that case I have forwarded it to the team, so they can take a look at it.
2 Likes
Hi, I experienced the same issue while also using the Matomo Cloud version.
Any idea about the current status of this problem?
Thank you,
Lukas
(Lukas Winkler)
February 8, 2021, 10:14am
6
At least the patch mentioned above should be part of Matomo 4 and therefore Matomo Cloud.
Could you explain precisely how one can reproduce the issue?
Hi, thank you for your quick reply.
Because I didnât know exactly how I could give you instructions to reproduce the problem, I investigated a bit more on my side.
The thing is, by stopping the Chrome debugger on the error it showed me that it comes from the âaddDebugValues()â method. See
By looking at the associated source code, it appears that there is a fix that was recently commited: https://github.com/matomo-org/tag-manager/commit/a0c83c281a1554291ae6fb7ae378992fec9a9251#diff-1640c5122a4dad7a7d493acee6fc798c6f20edc6674ffaedbb973fb3c70599db
This modification will probably fix the bug, as soon as it is deployed on the Cloud version.
Lukas
(Lukas Winkler)
February 8, 2021, 4:39pm
8
Hi,
Indeed the next Matomo release will include this fix.
1 Like
Excellent!
Do you have any idea about when this next release will happen?