google-tag-manager

How to make Google Tag Manager Analytics tags use the DEFAULT tracker?

纵饮孤独 提交于 2019-12-06 10:43:51
The analytics tags defined in GTM (not using a custom HTML tag for analytics) seem to have their own tracker. I have _gaq.push() based configuration (some custom variables) in my web page in the rendered html. And this configuration is applied to the default tracker . GTM on the other hand defines its own tracker with random name (its actually a number) and all configuration done in the GTM web GUI is applied on that custom named tracker. How do I make GTM use the default nameless tracker, so that my configuration holds true even from GTM GA tags? You can look at tracker list and names by

Issues in Google Tag Manager plugin in Cordova

╄→尐↘猪︶ㄣ 提交于 2019-12-06 08:49:25
问题 Am trying to use GTM plugin for Cordova - https://github.com/kraihn/cordova-plugin-tag-manager. Am facing issues on the iOS version of my cordova app. I get warnings that the binary resource file and plist file are not found. GoogleTagManager warning: Cannot find binary resource file 'GTM-XXXXXX'. GoogleTagManager warning: Cannot find resource file 'GTM-XXXXXX.plist' GoogleTagManager verbose: loading default container from GTM-XXXXXX.json I downloaded the json file from GTM account - Admin,

GTM data layer eventCallback function

雨燕双飞 提交于 2019-12-06 08:23:36
So i have Ecommerce code setup in GTM data layer, but after that is sent to Analytics i want the page to be redirected so i know i should be using eventCallback but it is not working for some reason. <body> <script> dataLayer = [{ 'transactionId': '56833', 'transactionAffiliation': 'TestName', 'transactionTotal': 1540.00, 'transactionTax': 385, 'transactionShipping': 0, 'transactionProducts': [{ 'sku': 'FFSS44HH', 'name': 'test', 'category': 'TestCategory', 'price': 1540.00, 'quantity': 2 }], 'eventCallback': function() { document.location.href='https://www.paypal.com/something'; } }]; <

trackingId and clientId with Google tag manager

一笑奈何 提交于 2019-12-06 08:13:08
问题 Using analytics.js, i can access to trackingId or clientId with this functions: ga.getAll()[0].get('trackingId') ga.getAll()[0].get('clientId') With Google tag manager, there is no ga object. How i can get that parameters? 回答1: The tracking ID is input into GTM either through a constant string macro (for reusability), or just as a string. The client ID can be fetched through custom Javascript (from the blog I am about to mention): function() { try { var tracker = ga.getAll()[0]; return

how to use the Google Tag Manager plugin for gatsby?

淺唱寂寞╮ 提交于 2019-12-06 06:28:58
问题 Please note that I'm still learning to use Gatsby & React. I have been trying to figure out how to properly use the Google Tag Manager Plugin for Gatsbyjs to insert tracking codes into my app. The official documentation of the plugin does not provide a lot of insights and examples, so I'm not sure if I understand it completely. What I want to do is to insert two GTM tracking codes into my app, one in <head> and one in <body> . With the static site approach, I could just copy and paste the GTM

dataLayer.push not working after GTM script

烈酒焚心 提交于 2019-12-06 06:24:02
问题 I want to implement the Enhanced Ecommerce with Google Tag Manager and I want to push some data for the tag Universal Analytics. I always created the dataLayer before the GTM script, but now I need to send other data with dataLayer.push And it doesn't work, datalaLayer.push only works if I do it just before the GTM script starts. Example. This works: <script> <head> dataLayer = [{ 'google_tag_params': { 'ecomm_pagetype': 'category', 'ecomm_category': '{{ $resource->seo->h1 }}', } }];

Google Tag Manager custom javascript variable based on ecommerce datalayer object

情到浓时终转凉″ 提交于 2019-12-06 04:39:13
I'm trying to calculate the value of the shopping cart based on data contianed in the GTM datalayer ecommerce object. I'm bringing the entire ecommerce object into a datalayer variable so I can work with it in the custom js variable, but I'm unable to make the recursive calculation work. Here's an example of code from the datalayer: { "event": "checkout", "ecommerce": { "checkout": { "products": [ { "name": "coat", "id": "14M", "quantity": 1, "price": "100.00" }, { "name": "pants", "id": "12L", "quantity": 3, "price": "50.00" } ] } } }` My goal is to identifies the number of products in the

Google Analytics not receiving events (Command ignored. Unknown target: undefined)

半城伤御伤魂 提交于 2019-12-06 02:02:40
So I got my Google Analytics set up via Google Tag Manager. Page views tracking is working fine. But when I try to track any events, the data is just not getting through to Analytics. The event tracking did not work with traditional Analytics code either. Analytics debug is showing several "Create config had an unknown parameter: x" and "Command ignored. Unknown target: undefined" Supposedly this means that there is something wrong with my tracker name. I have tried both default name and custom names. Might be worth mentioning: Until recently, my site's default URL was wrong in Analytics site

Universal Analytics - 3rd Party Payment Gateway

强颜欢笑 提交于 2019-12-05 20:35:19
Our website is currently tracking with Universal Analytics via Tag Manager. Our check-out process includes getting redirected to a 3rd party payment gateway before going to the Thank You Page. So, it would look like this: site.com/checkout --> site.com/payment --> security.com --> site.com/thankyou Security.com is a 3rd party site and I am unable to add the tracking code there. I'd like to be able to see who are able to get past the security.com stage and make it to the site.com/thankyou page. But with this setup, my reports show that after site.com/payment, the visitors exit. Then they return

How to make Google Tag Manager and Content-Security-Policy coexist?

拈花ヽ惹草 提交于 2019-12-05 14:47:34
问题 The Content-Security-Policy (CSP) header aims to protect your application against malicious resource injection in your web apps. To make it simple, you provide a whitelist of allowed domain origins for all your images, scripts, styles and so on. Meanwhile, Marketing team is using Google Tag Manager (GTM) to manage tags. The principle is to gather information from a page, send them to GTM and use those data as variables to generate tags, a mix of templated JS/HTML and those variables. The