How to extend Google Analytics & Ads installations with GTM

Google Ads and Analytics integrations available in WP Full Picture let you easily track user actions, WP data and WooCommerce events. However, if this is not enough and you need to track something else, then you can use Google Tag Manager to extend these integrations and track it.

And this is how to do it.

Step 1. Disable the “Protect dataLayer” option

In the settings of Google Tag Manager module there is an option to “Protect datalayer”. When it is active, it creates a separate datalayer for GTM and a separate one for Google Analytics and Ads.

gtm protect datalayer option

This is done to keep the data tracked by GTM separate from the one tracked by GA and GAds – which can sometimes overlap (more about it in Step 4).

However, if you want to extend GA or GAds with GTM, you cannot have it enabled. So simply disable this option and go to step 2.

Step 2. Add “Google Tag” configuration tag to your GTM container

gtm gtag conf tag

Add to your GTM container a Google Gtag tag and set it up:

  • with the measurement ID that is the same as the one in your Google Analytics module in WP Full Picture.
  • without any trigger (you don’t want to double track pageviews)

Step 3. Add the event tracking tags and triggers you need

gtm youtube tracking tag

And finally, you can add the missing functions that you need using the tags and triggers provided by GTM.

Step 4. Test thoroughly

With the dataLayer protection turned off, you will see in Google Tag Assistant that your dataLayer is filled with events tracked by GTM, GAds and GA.

Sometimes you may see that some events show up two or even three times. Fortunately, it does not mean that all tools tracked the same thing multiple times. WP Full Picture does its best to send the data only to the tools that need it.

tag assistant multiple events 2

In the image above you can see that even though add_to_cart event was triggered 3 times, each tool receives the data only once.

However, when you start adding your own trackers in GTM, you are on your own. You need to be careful with your setup and always test it to make sure that nothing is tracked multiple times.

Hint. To make sure that things are not tracked multipple times do not set up tracking the same things in the GTM module that you already track in your GA and GAds modules – the events from these tools will show up in the DL either way, so you can simply use them in your GTM setup (if you need them).