Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
42

From Previewing and Debugging in the Google Tag Manager help: Exit preview mode To exit preview mode from your container, click Leave Preview Mode, located in the orange banner on the Workspace Overview page. For shared previews, use the link received to go to the shared preview landing page. Click on Exit preview and debug mode to end your ...


7

Gael's answer is probably the best, but i just wanted to let you know that there's also a possibility of having the GTM container code, but not actually tracking the home page. In that case, you just need to create a trigger, that would look like in the image attached.


5

When adding exception operations, there's a note above it: Fire this trigger when an Event occurs and all of these conditions are true You'll need to create two separate rules, each containing just onePage URL operation. Then add both rules to the list of exceptions.


4

Click Target: The target attribute of the clicked element. Click URL: The HREF attribute of the clicked element, if any. Per the link provided. For a click URL it's associated with the HREF attribute of the clicked element or the link's destination. For the click target, its associated with the target attribute of the clicked element or specifies where ...


4

I originally tried adding the GTM using Glue for Yoast SEO and it did track the pages. However, that resulted in 2 AMP validation errors: The proper way of implementing the tag as of right now is via amp-pixel or amp-analytics. I used amp-analytics tag myself. First you would add this in the head: <script async custom-element="amp-analytics" src="...


4

The Event Name matters We thought that the "Event Name" was just a human-readable label, but apparently it actually has to match what is sent by JS. Changing it to match what's sent by JavaScript (dataLayer.push({'event': 'successful_signup'})) got it working.


4

I just tried setting up the default form submission trigger in a client's GMB container and was having the same problem. After a little digging around in Preview mode, I came up with the following solution: Create a second Form Submission trigger and select "Some Forms" under "This trigger fires on". Then set it to fire on submissions where the Click URL ...


4

As @Evgeniy has already covered in his answer, in order to add HTTP response headers to resources external to your site, you need to copy these resources locally - to a server that you control - so you can send the HTTP response header as part of the HTTP response. However, whether you should do this or not is another matter and each instance should be ...


3

Using GTM, you could establish a link click listener that fires on all pages, and then create an "Outbound link" tag to fire whenever a link is clicked. You can collect the href attribute of the link to pass into your event as well. That's it in a nutshell, but there's more details here if you like: http://cutroni.com/blog/2013/10/07/auto-event-tracking-with-...


3

If anyone ever comes across this same question, I found a strategy that helped me out. I used Screaming Frog and set up custom filters to contain the tags that were in my Analytics and Tag Manager accounts. Then I just crawled my website and it returned all the pages that contained the tags that I set up.


3

I do not use that plugin because it does not work with my other plugins. But I do track everything in GA and I deploy the video player through GTM. This is the code I use in GTM http://codepen.io/JaminQuimby/pen/yNaOwz I use the built in listeners in Vimeo, Ads, VAST Client to listen in on events I wish to capture. Example expanding to full screen mode. ...


3

Regarding the Property and View limit (50 and 25, respectively), there's no way around that, really, so you'll probably have to break up the sub-d's across several properties. So with that in mind, you could have one GTM container across all sub-d's, and then use a lookup table to determine which data from which sub-d's go into which property. Within the ...


3

To migrate, I recommend adding the Google Tag Manager container to your website, then test that the pageview tag for Google Analytics is working in preview and debug mode. Once you are happy that this is functioning correctly, you can remove the Google Analytics container and activate the pageview tag in Google Tag Manager. If you are concerned about ...


3

I've had a number of agencies tell me that my FB pixels had inflated or false data for the past few months. After some digging around Google I think what everyone confirms as a fix is to exclude traffic from that domain. Simply put GTM renders an iFrame for non-javascript traffic. That iFrame is triggering the FB pixel and inflating the traffic. Wrap your ...


3

I discovered that GTM doesn't like something about the HTML (probably the page_id attribute). So, instead, the <div> needs to be created dynamically using JavaScript. This is the final code we used: <!-- FACEBOOK MESSENGER CHAT BOX --> <script> // We create the DIV dynamically to work correctly with Tag Manager var chatDiv = document....


3

If you want to put your GA code and Facebook code in via tag manager, then yes, delete the old code, or you'll double count. But you don't have to - you can leave old tags on and just put new ones in tag manager if that's what you want. Though you have a lot more flexibility and functionality by putting those tags in tag manager


3

Have you looked at filters in the Admin section of Google analytics? You can create filters at the account level or view label. Choose the "exclude" filter for your domain name in "referral" field. Keep in mind that it will apply the filter for the data it collects from that point on, not on the existing data retroactively.


3

First of all, you need to make sure you are using the same Analytics version tracking code. In your question, the main tracking code uses gtag.js but the event code is based on analytics.js. You should use -as it's newest- gtag.js. So, the code to use would be: var trackOutboundLink = function(url) { gtag('event', 'clic', { 'event_category': '...


3

The easyest way not to display Google Tag Manager on Homepage is to check with php. You can insert GTM in the header.php file of your child-theme like this: <?php if (!is_home() && !is_front_page()) { echo 'your GTM code here'; } ?> Will display GTM everywhere but on home (blog posts homepage) nor on front page (the static page you ...


3

When Google Tag Manager is installed on a site (a script tag beginning function(w,d,s,l,i) and ending with your GTM container ID), it is not necessary to separately add Google Analytics tracking code to the site. If the Custom HTML tag you describe is only sending pageview hits to GA, you can replace it with a Universal Analytics tag of type Pageview, with ...


3

Of course, you can. It's as simple as creating the tags in Google Tag Manager and set up those events in Google Analytics as Goals. However, in this scenario, you can send the data to Analytics as events or virtual pageviews. As events, you can check them in the event's report and as virtual pageviews, you can work with them as usual URLs inside Analytics. ...


2

I have not used Tag Manager but I suspect the issue is caused by the ? at the end of you URL. My suggested solution would be to escape this so your URL will look like this: /secure/common/callback\? You may also want to investigate if you can use regex with your rules to make the above more accurate.


2

You could add data-attributes to your ad link if you are using HTML5: <a href="example.com" class="someclass" data-adposition="Banner Ad - Top" data-adnamesize="Ad Title - (588x88)" data-advalue="1.00" ><img src="example.com/ads/ad_588x88.jpg" alt=""></a> Then add a new tag in Google Tag Manager for catching clicks on this kind of links (...


2

Although an old question, in case someone is looking for the answer: Simply replace the div with the clicked element of choice (span,p,li,etc.).


2

But Google Analytics code should be able to track that data automatically which shows up under social interaction section in Google Analytics and in case you wish to integrate your Stumbleupon ID with Google Analytics then you can do the same under the advanced Social account integration section of Google Analytics. Or In case you use a third party ...


2

You can still track "[...] custom events I created to know when someone watches our videos, clicks-through to a dealer website, or downloads a manual" using Google Tag Manager. You would use Click Listeners, Link-Click Listeners, Form Submit Listeners and Timer Listeners to trigger your events. Here is a great guide to Auto Event Tracking in Google Tag ...


2

Set up your container tag on your site and perhaps create some tags under the container On the left hand side under Versions, click on Overview You need to create a new version of your container each time you make changes in order to publish individual versions, so click Create Version at the top on the right of those 4 small icons (which I also thought were ...


2

According to GreatFire, Google Tag Manager is currently not blocked in China. This doesn't mean that much though; the Chinese censors may have decided not to block GMT continuously, but only in intervals to make it seem Google is at fault.


2

There are many ways so it really depends on what you are trying to accomplish. Below are a few options that will work on contact forms and any other type of click action. 1) You can setup a link trigger in GTM with HTML5 data parameter and class or ID <input id=”contact-submit” class=”button” type=”submit” value=”Submit" data-form="Contact Us" data-...


2

I worked around my problem by creating a Custom Environment, and publishing my changes to this environment. I still don't know why the "Now Editing" default environment was showing very old versions of some tags.


Only top voted, non community-wiki answers of a minimum length are eligible