1. Home
  2. Docs
  3. Google Tag Manager Guide
  4. Several Common Event Tracking Methods
  5. Page Element Positioning

Page Element Positioning

In this section, we will talk about event tracking, and introduce one of my most commonly used methods to precisely locate by trigger. Suppose we want to track the location of the event is to click Contact Me, the location is as follows:

Page Element Positioning

The principle is to use the trigger to accurately locate, usually using some classes, id, text to locate, the user clicks to the location to trigger.

Setting Process:

1、Create A Trigger

Create a trigger, select the All Element type:

Page Element Positioning

name it Contact Me, and select Some Click.

Page Element Positioning

Return to the position in the page that needs to be tracked, move the mouse to this position, right-click to open Inspect to open the source code:

Page Element Positioningand then copy Contact Me, The specific operations are as follows:

Page Element Positioning

Then paste it into the trigger, the final configuration is as follows:

Page Element Positioning

The positioning here can generally use Click Classes, Click ID, Click URL And Click Text and other unique attributes to locate, this is more convenient, for example, you can also use Click URL to locate, it can be Click URL equals https://www.bbccss.com/contact-me

If you don’t have these variables in your triggers, please think of built-in variables to uncheck these variables.

2、Set Tag

Click on Workspace> Tags> New> Choose a tag type to begin set-up …> Google Analytics: Universal Analytics, Named Contact Me

Track Type set as Event
Category set as Contact Me
Action set as Page URL——The purpose of this is to distinguish clicks on different pages.
Non-Interaction Hit set as true——Does not include bounce rate calculations.

The details are as follows:

Page Element Positioning



Click Preview in the upper right corner to test:

Page Element Positioning

Then return to the blog to simulate the operation, click on “Contact Me”:

Page Element Positioning


Click on to see Summary in the lower left corner, find the corresponding operation, click on, and see Tags Fired On This Event Whether there is an event you set, if it is, it means it was successfully triggered.

The test is successful, you can publish it first,

If you don't understand, You can leave a comment below.
Tags ,