google-tag-manager

GTM - pushing events/data to gtm dataLayer not sending anything to https://www.google-analytics.com/r/collect?v

淺唱寂寞╮ 提交于 2019-12-22 05:21:43
问题 I have added this gtm code in my chrome extension page(injected by the content script in and iframe) // <!-- Google Tag Manager --> (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','owDataLayer','GTM-XXXXXXX'); // <!-- End Google Tag

How to disable Google Tag Manager console logging

跟風遠走 提交于 2019-12-21 12:24:47
问题 After I added Google Tag Manager to the project I see lots its log entries in the console. Is there a way to disable it? Console log is full of noise: GoogleTagManager info: Processing logged event: _vs with parameters: { "_o" = auto; "_pc" = UIViewController; "_pi" = "-3988739357756819671"; "_sc" = "Bubbie.MamboBamboViewController"; "_si" = "-3988739357756819670"; } 2017-07-27 12:01:09.744 BubbieHuff[77205:6894827] GoogleTagManager info: Processing logged event: show_view with parameters: {

Differences between “Click Classes” and “Click Element” in Google Tag Manager

僤鯓⒐⒋嵵緔 提交于 2019-12-21 09:07:25
问题 I don't really understand the differences between "Click classes" and "Click Element" in Google Tag Manager. I don't understand the expected use of these event and I don't understand their respective behavior regarding "contains" and "CSS selector". Let's say I have class="buttons primary small" . What's working : Click Element -> Matches CSS selector -> .buttons.small Click Classes -> contains -> small What's not working Click Element -> contains -> .buttons.small Click Classes -> Matches

Google Tag Manager dataLayer within iframes

假如想象 提交于 2019-12-21 05:46:09
问题 I'm wondering if it's possible to 'sync' the dataLayer between an iframe and it's parent page. The situation: I have a parent page with a GTM container and a hardcoded dataLayer. In that parent page I have an iframe with the same GTM container. What I want to do is read the dataLayer in the parent from the iframe, ideally through the Tag Manager (Macros). The variable can be updated from the parent page, but the iframe should only read the data. Is this possible? Google is pretty hazy about

Google Tag Manager in Android cordova

那年仲夏 提交于 2019-12-21 04:46:10
问题 I have a problem in integrating the Google Tag Manager in my Android mobile app built with ionic2/cordova. Everything works correctly when running in web browser through ionic serve , but it has problems with the native builds. iOS: It didn't work at first, but after adding https://github.com/driftyco/cordova-plugin-wkwebview-engine plugin, the google analytics started to receive traffic. So this one is solved and works as it should. Android: After running the app and debugging it using

Find a specific line of script using JS/jQuery in GTM

好久不见. 提交于 2019-12-20 07:46:02
问题 I want to use Google Tag Manager (GTM) to identify if a virtual page view has been set within the Google Analytics (GA) script (which sits in the <head> ). The GA code is NOT set via GTM. The virtual page view looks like this: ga('send', 'pageview', '/virtual/example1/'); I want GTM to search specifically on every page for just ga('send', 'pageview', '/virtual Is there a line of JS or jQuery I can use to identify this line. Things like getElementById() don't work because there is no ID.

Google tag manager not firing event in Firefox

偶尔善良 提交于 2019-12-20 05:50:51
问题 I integrated the Google Tag Manager for use with Google Analytics with Angulartics 2 and Angular 4. In Chrome everything works perfectly fine but in Firefox (v59.0.2) I can see, that the analytics scripts are loaded but the page navigation events never show up in the network view. Accordingly, in the analytics realtime view I can see the user interactions which come from Chrome, but nothing from Firefox. The strangest of all things is, that if I deploy my page locally and open it in Firefox,

Extract part of URL with Google tag manager

非 Y 不嫁゛ 提交于 2019-12-20 05:47:24
问题 So i have this url "https://www.site.be/pand/titel-van-het-pand-t8500-17082-4" and i have to extract the reference number at the back of the url. In this example "t8500-17082-4" with GTM to put into a custom dimension like this: var dimensionValue = 'REFERENCE_CODE_HERE'; ga('set', 'dimension1', dimensionValue); The reference codes at the eind of the url could start with either -t8... or t9... 回答1: In GTM go to "Variables" -> "NEW" -> "Custom JavaScript" and type: function(){ var myRegexp = /

Setting Google Tag Manager cookies with SameSite and Secure attributes

℡╲_俬逩灬. 提交于 2019-12-19 17:41:41
问题 Chrome is reporting the following warning: A cookie associated with a cross-site resource at https://www.googletagmanager.com/ was set without the SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure . You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature

Accessing ClientID set by Google Analytics through Google Tag Manager

穿精又带淫゛_ 提交于 2019-12-19 09:16:34
问题 I have setup a new Universal Analytics tracking and would like to store ClientID in one of the custom dimensions slots . The tracking tags are implemented through Google Tag Manager (using the predefined UA tag) and I am having the difficulty to passing the Client ID (via custom JavaScript Macro) with the basic pageview request. I have named my tracker so that I can access it and this code runs without any error in console, however when used with GTM, it's returning an error. ga.getByName(