LOG IN OR SIGN UP
Log in to your account
Sign up

Track Site Interactions Without A GTM Custom Data Layer

23 June 2018 | 1 comments | Posted by Che Kohler in nichemarket Advice

Track on site interactions with a custom data layer

So you have a website with Google Tag Manager and Google Analytics installed but you're not tracking much besides page views, if this is your current set up then you're not alone. 

Even though GTM and GA have made it so easy to create custom tracking solutions for websites very few sites take full advantage of these features. While it is common practice, it is really something website owners need to look into correcting.

These sorts of bad practices are why data analytics experts such as myself have a tough time truly evaluating user behaviour in order to make valuable marketing recommendations.

Why don't sites track user behaviour?

User behaviour and interaction points aren't tracked for a number of reasons, but these are a few popular ones I've encountered in the past.

  • Website owner/developer doesn't know how
  • It's not an area of concern or expertise
  • It's not known that these functions exist
  • Limitations of the CMS
  • Limitations of development resources
  • Conversions are meeting business goals, so optimisation is not a priority

GTM and the data layer

Depending on a users website, their technology stack/CMS, the complexity of data requirements I usually opt for the use of the data layer. 

The data layer is a custom javascript that we can use to fire unique or custom values into GTM and then into GA in order to track certain user actions. This could be anything from a search, a form complete, an account sign up, or a newsletter sign up.

While I strongly recommend using the data layer, I know it's not always practical or possible for every site. Thankfully GTM allows as a myriad of different ways to get things done, and the element visibility tag has become my new favourite method.

Element visibility tag

The element visibility tag allows GTM to highlight certain HTML on your page and use that as a trigger method for specific tags. This can be done by either highlighting a specific div or class via the ID or CSS selector method. For more on the element visibility tag check out my previous post - Google Tag Manager Launches Element Visibility Tag

How to use element visibility tag

Let's say for example you want to track a form complete but your form executes within one page and presents the user with a thank you message on the page.

There are currently no changes pushed to the dom, and there is no second-page view to use as your trigger method.

Setting your thank you message in a div for example:

<div id="form-success-msg">
Thank you for signing up
</div>

The unique ID will allow you to track when this message is displayed on the page.

Note: This can also be done on the class level if you use the CSS selector method which I will tackle in another post

How to set up the tag

Now that you have a unique identifier in your div ID its now time to set up the tag. Head to your Google Tag Manager account and create a new tag.

Setting up the tag

  • Give your tag a name - IE Form complete tag
  • Select the tag type - If you're running the standard GA you would go with Universal analytics
  • Select track type - Event
  • Provide your event variables - Category, Action and Label
  • Select "Enable overriding settings in this tag"
  • Insert your GA ID in the tracking ID field

Setting up the trigger

  • Create a new trigger
  • Provide a name - Form tracking trigger
  • Select element visibility trigger type
  • Selection method choose - ID
  • Element ID set this to the name of the ID in your div, in this case, it would be "form-success-msg"
  • Select when to fire, in most cases you would only run this once per page load
  • You can leave minimum visibility to 50
  • Select observe DOM changes
  • For added control Select some visibility events
  • Select page URL, Contains and provide the URL where your form lives on
  • Click save and submit

Note: This trigger can be used for multiple tags such as your Facebook, Twitter and even Adwords event tracking tags

Gain greater visibility

I highly recommend you take full advantage of the versatility of the element visibility tag and start creating tags on user interactions you feel are essential to your site. 

Monitoring more interaction points will give you more insight into things like funnelling, churn rate and give you a more accurate depiction of how visitors are using your site. Good luck and keep tracking!

Contact us

If you want to know more about tracking solutions or Google Tag Manager, then don’t be shy we’re happy to assist. Simply contact us here

Tags: google tag manager, Tools, tracking

Previous: {{ previousBlog.sTitle }}

Posted {{ previousBlog.dtDatePosting }}

Next: {{ nextBlog.sTitle }}

Posted {{ nextBlog.dtDatePosting }}

You might also like

strange traffic sitings in GA4

Why Am I Seeing Strange Referral Traffic In GA4?

02 March 2024

Posted by Che Kohler in nichemarket Advice


A look at the recent fake traffic spike many GA4 profiles are seeing at the moment, what are the causes, what you can do about it and how to report o...

Read more
Business directories in Germany

51 FREE Business Directories In Germany

23 February 2024

Posted by Che Kohler in nichemarket Advice


A comprehensive list of business directory sites in Germany that allow you to add your business for free and gain some referral traffic, leads and li...

Read more

Leave us a comment


{{comment.sUserName}}

{{comment.iDayLastEdit}} day ago

{{comment.iDayLastEdit}} days ago

{{comment.sComment}}

Sign up for our newsletter