Without the ID attribute, you can’t easily track clicks on a link via GTM. If you can’t find a unique class name, ask your developer to add the ‘ID’ attribute with a unique value. Note: If you do not find any ‘id’ attribute for the link you want to track, look for the unique class name. The ‘id’ attribute’s value must be unique and must not contain any white space.Īnd ‘id’ is the attribute of element which is used to uniquely identify this element in a HTML document. In HTML, the ‘id’ attribute uniquely identifies an HTML element (like link, button, etc). You will need this ‘id’ later on while setting up triggers in GTM. Step-4: Note down the value of the ‘id’ attribute of the anchor tag (). In our case, it is ‘checklist’. Tag Type: Google Analytics: Universal Analyticsįiring Triggers: Check for clicks on the download button Tag Name: Send button clicks to GA as event Step-6: Create a new tag with the following similar configuration, which can send clicks on the tracked button to Google Analytics as an event: Note(4): ‘Click ID’ is a built-in variable in GTM which returns the ‘id’ attribute of the link clicked. Note(3): ‘Page URL’ is a built-in variable of GTM which returns the URL of a web page. Note(2): If you are not sure what a trigger is and how to create a new trigger in GTM, then read this article: Understanding Triggers and Variables in Google Tag Manager Note(1): In GTM, if you want to track any HTML element other than a link, you set the ‘Trigger Type’ to ‘Click All Elements’. These are the basic steps that need to be followed for every type of event (link tracking, button tracking, etc.) using Google Tag Manager. Step-7: Once the validation is completed, you can publish the changes in the GTM. Step-5: Check if the event data is flowing in the Google Analytics real-time reports. Step-4: Validate the tags created using GTM preview mode. Step-3: Set up tags for each event and link to the triggers accordingly. Step-2: Create event triggers for each event you would like to track on the page using CSS element selectors. Step-1: Compile a list of events that you would like to track. This tag is used to send event tracking data ( Event Category, Event Action, Event Label and Event Value) to Google Analytics. You can track Google Analytics events via Google Tag Manager by creating a Google Analytics tag of type ‘Event’ and then creating a specific trigger to track specific time of users’ interactions (like PDF Downloads, image link clicks, button clicks, form submissions, form fields, video watching, scrolling, external link clicks etc.).Įvery time you want to track a new page element, you need to create a new Google Analytics tag of type ‘Event’. How to track Google Analytics events via Google Tag Manager How to track custom events in Google Tag Manager.Form field tracking with Google Tag Manager.How to track form submissions via Google Tag Manager.How to track link clicks on images in Google Tag Manager.How to track outbound link clicks via Google Tag Manager.How to track link clicks in Google Tag Manager (tracking PDF downloads).Tracking clicks on a button that is embedded across a website.How to track a button click in Google Tag Manager.Before you start event tracking via Google Tag Manager (GTM), do this….How to track Google Analytics events via Google Tag Manager.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |