Our conditions will be Page Hostname contains codepen, but you should fill the string box with your own domain. This is the number of times the data will repeat counting.įinally, we’ll choose the conditions to deploy the trigger. We’ll keep this interval as 2.5 seconds, which we’ll enter as 2500 milliseconds. Next, choose the time Interval after which the trigger will push the data into our account. Go to Triggers → New from the home screen of Google Tag Manager to build a time trigger. ![]() We’ll start with the built-in default timer trigger in Google Tag Manager. Let’s build a timer trigger on Google Tag Manager! Build a Timer Trigger in GTM We’ll learn to track these messages with Google Tag Manager so that you can record user results. Your use case may not look identical, but many actions (form submissions, checkout payments, etc.) can take some time to send a request, send validation, and get data back from the server. Since the error and success messages don’t appear for two seconds, that data won’t be available yet on a user click. However, if you just deploy a click trigger to observe the result, you won’t track any useful data. After all, it’s important to know how users are engaging with your content and experiencing your site! If you had something similar on your website, you would want to detect whether there is an error message or success message when a user clicks the button. (We’ve modified this button by linking it to the Google Tag Manager and applying a click trigger.) This code creates a “Send” button (like for a contact form) that will display either an error message or a success message two seconds after it is clicked. This means that if you want to track duration based on an event rather than a pageview, you’ll need a different approach.įor this tutorial, I’ll demonstrate using a CodePen (by user Immanuel Pandiangan). However, the feature is limited in this application because we can’t control when the trigger starts - it just deploys on the pageview. ![]() This is a useful feature when you want to display a success or error message in response to a user action, such as submitting a contact form. After a particular duration of time, you can fire the Tag on your web page. When a user arrives on a page that uses this trigger, the timer starts. The timer trigger is a built-in feature of Google Tag Manager, but you can heavily customize it around your tracking specifications.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |