I create a user-defined variable var1, and I’d like to use it in another user-defined variable (Custom JavaScript) var2.
How should I refer var1 in the code of var2?
I try to use {{var1}} but it won’t work.
And I can’t find ways to call it in the object MatomoTagManager.
Exactly the same issue.
In my case, I would like to use {{ClickElement}} in my Custom JavaScript variable and I have the same error in the Web console.
JavaScript error from Tag Manager can break the previewer?
You can use MatomoTagManager.dataLayer.get(“mtm.clickElement”)
or MatomoTagManager.dataLayer.values[“mtm.clickElement”]
to get the values of these Pre-configured Variables.