Hi guys, I’m looking to get custom dimensions to work with GTM.
I’ve been setting them in GTM (see screenshot)
All seems ok in Piwik pro as well
But I only get undefined as the dimension value.
Can someone help?
Hi guys, I’m looking to get custom dimensions to work with GTM.
I’ve been setting them in GTM (see screenshot)
All seems ok in Piwik pro as well
But I only get undefined as the dimension value.
Can someone help?
Hey! Are you sure that the variables set in GTM are working properly?
The method you are using is correct.
Hey Michal,
I fixed it by putting things in this order:
Piwik tracking code
Datalayer values
Custom dimensions
My mistake was to fire custom dimensions via GTM before info was passed to the datalayer. So the custom dimensions sent were empty. Now it all works.
By the way, it looks like a Piwik feature called dimension value grouping helps creating custom dimensions without going through the datalayer option. Smart.
Hello @Jerome
Are you sure that the tag with the setCustomDimensions needs to be send after Piwik Tracking Code ?
Because I saw in Piwik documentation this sentence : "This function does not send any data to the Tracker. It prepares a custom dimension to be sent with following events, e.g. page view, e-commerce events, outlink or download events.
And for me the Piwik tracking code is sending the pageView event automatically so if I understand well, I need to place it after the customDimensions.
Thanks for your answer !
(Je parle francais)