Data Quality
Making Science
Jorge Zamora
Jorge Zamora
Data Analytics & CRO Web

Advanced Google Tag Manager(GTM) options and your application

Tuesday July 17th, 2018

In this post we are going to talk about how to use the advanced options of Google Tag Manager and its application for the resolution of errors, more specifically about faults in the insertion of facebook conversion pixels for a contact form.

For the understanding of this article we assume that you are familiar with GTM and the use of it for the management of your site’s tags. As you well know, GTM allows us to manage all the pixels of your web through a single container in a simple and autonomous way. But this does not mean that we do not have cases of errors  like the one we explore below. Let’s take a look!

Once we have generated the two pieces of code necessary on all the pages that helps us to measure desired events. The fragment looks like this:

and a second fragment is an event pixel that helps us to measure specific actions of the user and is located only in the pages that the action happens, in our case the sending of a contact form. The script will look like this:

Once we have created both tags (page view and conversion) and we check through the GTM preview that both pixels fire correctly where we have specified with our activators (this is covered in another post), we can find cases in the that the console gives us the following error:

What does this mean? Well, this is telling us that the conversion pixel (event script) has not been defined and is not collecting information. If we go to our administrator of facebook ads we can check how the pixel state tells us that there is no activity, and therefore it is not working.

Why does this happen? If, when doing the preview check, does the tag fire correctly? How can we solve it?

This happens because you are executing the conversion tag after the pageview tag. The asynchronous loading of the Java Script means that there is no order in the execution of the scripts. This is when we need to utilize  the advanced configuration of GTM, sequencing of tags, to give an order to the tags and mark when we want to fire the tag, that is, what sequence we want the tags to follow to solve the error.

What we have to do is go to the conversion tag, which is what we have to tell us to activate after the pageview tag, go to tag sequencing, within the advanced options and configure the tag to activate the tag page seen before the conversion tag does. After saving the changes, we would have to do the test again and check that the console error has disappeared and that in our Facebook ad manager the pixel is active.

Although the advanced options of labels are not used regularly, knowing their functionalities can help us to solve certain errors and be very useful in many occasions.

We use cookies to improve your experience as a customer. Cookies Policy

×