[Google Tag Manager] Tagging Screens with div ids vs css classes

Forge Component
Published on 2019-05-02 by Hanno
1 vote
Published on 2019-05-02 by Hanno

Hey guys,

I have been trying these last days to tag different screens (with events on tag manager) in order to create a conversion funnel in Analytics and pass data to Data Studio. Notice that URL stays the same throughout the journey

I have been noticing when creating a trigger for each specific page/screen,  divs ids are dynamic, which makes it impossible to fire the triggers / tags on gtm and thus unable to create a proper conversion funnel 


Simulation 1 Day 1:

div id contains:Theme_wt18_block_wtMainContent_wt7_WebPatterns_wt82_block_wtTitle

Simulation 2 day 2:

div id contains:Theme_wt16_block_wtMainContent_wt5_WebPatterns_wt82_block_wtTitle

Other option would involved to use css classes, but again, due to code restrictions - the css class -CardSimple Card  is the same in every screen/step.

DOM Title (Page) also doesnt work (with copy selector)

NOTE: URL is the same throughout the journey, so my approach cannot go on that way either

Has any of you encountered such a challeging implementation? Any tips?

For your container divs, ensure that your Input Parameters are created and matched up with your divs in the JS script. Also remember to create a container using the widget. With the Google Tag Manager are you using JS or Python? 

Can you share a screenshot of the code error you are experiencing. I'm assuming you're in Reactive Web?