Note: since timer_cycle is a custom parameter, you would need to register it as a custom dimension in GA4. So, this changed some parts of the GTM interface. Important: Google has replaced the GA4 configuration tag with Google Tag. Similarly, if you wanted to capture additional details like gtm.timerCurrentTime or gtm.timerElapsedTime, you can follow the same route by creating the datalayer variables for them.Īs a result, your GA4 event tag could look like this: That tag sends the information about the number of activated triggers associated with that event with the help of the dlv – gtm.timerEventNumber variable. What does it mean? Say, that you set the timer to fire every minute, dispatching a specific GA4 event tag. What you’ll see it your newly created variable dlv – gtm.timerEventNumber. Then click the event and head over to the Variables tab of the Preview and Debug pane.Refresh P&D Mode and navigate to the tab with the website you’re currently working on.If you wish to know the event number (which iteration of the timer trigger was just completed), you can create a Data Layer variable gtm.timerEventNumber (see the example below). The remarkable thing about Google Tag Manager is that you can fetch any parameter from the data layer and turn it into a variable. gtm.timerElapsedTime – The time in milliseconds since the timer started.gtm.timerCurrentTime – The timestamp of the most recent timer activation.gtm.timerStartTime – The timestamp of when the timer first started.gtm.timerInterval – The value you set in the Interval option when creating the timer. ![]() gtm.timerEventNumber – The number of activated timers on the current page.Each timer you have on the page has a different ID. gtm.timerId – A unique identifier number for the timer.You should see the array of various parameters.Įvery time a timer trigger activates, it pushes a particular set of data to the data layer: After waiting 10 seconds, the gtm.timer event appears on the left side of the pane.Ĭlick it and navigate to the Data Layer tab. If you set it to fire after 60 seconds (or more), you’ll wait too long, and your debugging session will become super boring.Īnyway, let’s go back to our Preview and Debug mode. Pro-tip by Captain Obvious: for testing purposes, create a timer trigger that fires after 10 seconds (or even less). ![]() (to test how the trigger works).Īfter the preview and debug console appears, wait for the timer trigger to activate. I used All timers.Ī sample timer trigger could look like this (fires once after 10 seconds on all pages):Īfter creating a timer trigger, enable GTM Preview and Debug mode, and navigate to the new window with the site you’re working on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |