Hello dears!
We implement Matomo through GTM. So I set events as custom HTML code in GTM. I want to add Dimensions to events. Do I use my script correctly? Thanks
Please note once a Custom Dimension is set, the value will be used for all following tracking requests and may lead to inaccurate results if this is not wanted.
With your implementation the event would fail because you’re exceeding the standard parameters:
You shouldn’t need to add the custom dimensions to the subsequent event (from {{application_referrer}} and further), because you’ve set them up in the lines above.
The js library should handle them for every event in the same page after you’ve set them up.
This implementation is in fact usually made with page-level dimensions such as content groupings or other page-level parameters… you set them up before every tag is fired and from there you just fire your tags, such as every tag does have them (from the pageview to all of the events that gets triggered on page).
So ask yourself: are the custom dimensions you want to track valid for every event on page or just that one event?
This should decide between one implementation or the another.
Yup. It may be that some of the custom dimensions values you’re tracking there can be effectively used for Category, Action and Name fields instead, but that’s up to you I guess.
I’d recommend going that way because custom dimensions takes a load with data processing and can burden your database in the long term, so it’s not a good idea let them proliferate if you have built-in dimensions as alternatives.