google-tag-manager

Why Google Tag Manager puts both display:none AND visibility:hidden on iframe?

北战南征 提交于 2020-01-25 01:03:30
问题 If you take a look at the <noscript> part of the Google Tag Manager embed code, you'll notice something like: <noscript><iframe style="display:none;visibility:hidden" src="//www.googletagmanager.com/..." height="0" width="0"></iframe></noscript> I can understand why style="display:none" would be important (it will hide the element such that it takes up zero space in the layout and yet still fetches the content) however, why add the "visibility:hidden" part? It seems to me like it adds no

NuxtServerInit: Add Google-Tag-Manager scripts to head an body

泪湿孤枕 提交于 2020-01-24 19:44:09
问题 I use one nuxt instance to serve several domains with different languages. For each domain I use a different Google-Tag-Manager account. Within nuxtServerInit I add to the store the hostname and also the Google-Tag-Manager ID. Now I am looking for a way to add the Javascript snippets to my nuxt project. This one needs to be in the head <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d

Get element text through GTM Custom JavaScript Variable

删除回忆录丶 提交于 2020-01-23 21:09:18
问题 I have two groups of links all with the same class names, the only difference is the text in the . I need to get the text for the clicked link and pass it to GA through GTM. <div class="item-set"> <header>Section Title One</header> <section class="products"> <div class="list"> <a href="/Product/60216935"><img src="/ProductImages1.jpg"></a> </div> <div class="list"> <a href="/Product/6021693x"><img src="/ProductImages2.jpg"></a> </div> <div class="list"> <a href="/Product/6021693y"><img src="

Running Google Optimize when deploying Analytics with Tag Manager results in an error

人盡茶涼 提交于 2020-01-14 09:18:39
问题 Update: A/B tests are working fine. Redirect tests are running but not reporting back. I followed Google's article How to use Optimize when you deploy Google Analytics with Google Tag Manager, but I keep getting an error on Google Optimize: Something seems wrong. Your experiment is running but hasn't received visits. I used the Analytics debugger and everything seems fine, so I'm asking for your help. Here's my setup: <meta charset="utf-8"> <script>dataLayer = [...]</script> //Page hiding

Running Google Optimize when deploying Analytics with Tag Manager results in an error

青春壹個敷衍的年華 提交于 2020-01-14 09:18:07
问题 Update: A/B tests are working fine. Redirect tests are running but not reporting back. I followed Google's article How to use Optimize when you deploy Google Analytics with Google Tag Manager, but I keep getting an error on Google Optimize: Something seems wrong. Your experiment is running but hasn't received visits. I used the Analytics debugger and everything seems fine, so I'm asking for your help. Here's my setup: <meta charset="utf-8"> <script>dataLayer = [...]</script> //Page hiding

I use Google Tag Manager to fire tags on my website.Variables “undefined” in custom code for any version of Internet Explorer

百般思念 提交于 2020-01-13 10:07:31
问题 I am using Google Tag Manager to fire tags on my website. The tags are firing correctly in all browsers except Internet Explorer (any version). What is happening is that the GTM macro is not getting populated in my custom Javascript when using Internet Explorer. However, if I refresh the page they get populated. Based on this I assume the issue is that the tag is firing before the DOM is completely loaded. I am using {{event}} equals gtm.dom in the "Rule". I have also tried to use {{event}}

Custom GTM event is not showing

余生颓废 提交于 2020-01-11 14:43:11
问题 I need a custom event ("CasaCalculatorEvent") when clicking a modal. But in dataLayer, when I click its changes from "CasaCalculatorEvent" to "gtm.linkClick". Receive like this in dataLayer: My code: 回答1: try this: <button onclick="logThis()"> click me </button> var dataLayer = window.dataLayer || []; function logThis(){ dataLayer.push({'event':'CasaCalculatorEvent'}); // print the last dataLayer entry alert(JSON.stringify(dataLayer[dataLayer.length - 1])); } Fiddle: https://jsfiddle.net/ajsn

Google Tag Manager error: “No HTTP response detected”

筅森魡賤 提交于 2020-01-10 05:57:27
问题 I have added the Google Dynamic Re Marketing Tag to my website by use of my GTM account (test@gmail.com) successfully; it was shown with minor warnings in Google Tag Assistant as well. But, when I later switched to another GTM account (original@gmail.com) with the same settings it shows an error: “No HTTP response detected”. How this can happen when both the GTM accounts have the same data ? Any help appreciated. Thanks! 回答1: This means clearly the code is not getting executed, could be

How to add Google Tag Manager firing rule for Backbone Marionette site?

一世执手 提交于 2020-01-07 07:26:18
问题 I have already built a site with backbone marionette and now I am trying to use Google Tag manager to add the tracking. But I have no idea how to configure GTM, in order to listen page change and button click event. 回答1: Clicks are up to you to set up listening events and track manually from views. Page views can be tracked like this: Backbone.history.on('route', function() { // Send Backbone.history.fragment to your page view tracker }); 回答2: There is a bit of fiddling required there. Tag

Google Analytics Tag Manager fails

五迷三道 提交于 2020-01-07 04:21:09
问题 Google recently released a new feature "Tag Manager" https://developers.google.com/tag-manager/devguide#migration https://developers.google.com/tag-manager/reference#varnames Do you know any success stories and give successful site html-examples? I was not able to make Events working. Here is my site, but it fails. You can see which code is inside by Ctrl+U in FF. http://landkey.org When I click on test button which supposed to send this event: ..... input type="button" onclick="dataLayer