Post by account_disabled on Mar 6, 2024 4:42:40 GMT -5
The depending on user input its not a simple truefalse variable that can be easily attached to a suitable event tag. While we could use the DOM Element variable type to scrape the value of the Occupation dropdown field directly off the page such an approach is not particularly scalable. A far better solution would be to fire the value of the field along with the values of any other fields you feel may offer to your websites data layer. Attention people who dont yet use a data layer While your development team will need to be involved in the implementation of a data layer its well worth the effort.
The advantages for your reporting can be huge particularly for larger organizations. Defining the contents Greece Mobile Number List of your sites data layer is a great opportunity for crossteam collaboration and means that all potentially insightful data points are accessible in a machinereadable and platformagnostic format ready to be fired to GA. Its also less subject to mistakes than adhoc tracking code. from content the data layer isolates your data. Your developer will need to make the required information available in the data layer before you can define it as a Data Layer Variable in GTM and start using it in your tags. In the example below imagine that the JavaScript variable myValue has been configured to return the occupation entered by the user as a string.
We push it to the data layer then define it as a Data Layer Variable in GTM var myValue Professional Juggler dataLayer.pushuserOccu pation myValue CUsersTho masB.BUILTVISIBL EAppD ataLocalMi crosoftWindows INetCacheCont ent.Wordg tmdlv.png Attach a custom dimension to your User Registration event tag as before then simply reference this Data Layer Variable as the dimension value. Done Our third example follows the exact same principles Having identified productinstock status as a hitlevel datapoint with potential reporting insight and with our data layer configured to return this as a variable on product pages we simply.
The advantages for your reporting can be huge particularly for larger organizations. Defining the contents Greece Mobile Number List of your sites data layer is a great opportunity for crossteam collaboration and means that all potentially insightful data points are accessible in a machinereadable and platformagnostic format ready to be fired to GA. Its also less subject to mistakes than adhoc tracking code. from content the data layer isolates your data. Your developer will need to make the required information available in the data layer before you can define it as a Data Layer Variable in GTM and start using it in your tags. In the example below imagine that the JavaScript variable myValue has been configured to return the occupation entered by the user as a string.
We push it to the data layer then define it as a Data Layer Variable in GTM var myValue Professional Juggler dataLayer.pushuserOccu pation myValue CUsersTho masB.BUILTVISIBL EAppD ataLocalMi crosoftWindows INetCacheCont ent.Wordg tmdlv.png Attach a custom dimension to your User Registration event tag as before then simply reference this Data Layer Variable as the dimension value. Done Our third example follows the exact same principles Having identified productinstock status as a hitlevel datapoint with potential reporting insight and with our data layer configured to return this as a variable on product pages we simply.