google-tag-manager

custom event trigger in google tag manager

女生的网名这么多〃 提交于 2020-01-01 14:47:47
问题 Every time i create a custom trigger event it doesn't get fire. Can anybody please what may be the reason. I have created 'gacustomevent'custom triggerand have name it 'gaevent' but the event is not getting fired. Iwant to use the event in the dataLayer to capture the value. Any advice on how to get issue resolve 回答1: It's a bit unclear from your question how you set this up. It should look like this: dataLayer.push({ 'event':'myEvent' }) (this assumes that the dataLayer is already

Console returns value but Google Tag Manager variable does not

眉间皱痕 提交于 2019-12-25 17:57:08
问题 When I put dataLayer[1].ecommerce.checkout.products[0].metric2 in the console, it return the correct value. However, when I try to extract the value from a Custom JavaScript variable ('Test') in Google Tag Manager, it returns undefined when Google Tag Manager is in preview mode. The JavaScript code: function(){ var basketSize = dataLayer[1].ecommerce.checkout.products[0].metric2; return basketSize; } 回答1: In case your questions hasn't been answered yet: The thing is you yon't want to

How to you combine two dataLayer variables into one in Google Tag Manager

夙愿已清 提交于 2019-12-25 11:57:23
问题 There are two dataLayer variables on the page. How do you combine both of them into one single variable so that it can be pushed into analytics ? dataLayer current format PageName: AIR_SEARCH_PAGE Flow:BOOKING I want to create another variable which is XYZ and the result to be displayed as BOOKING:AIR_SEARCH_PAGE. How to achieve this ? XYZ:BOOKING:AIR_SEARCH_PAGE 回答1: There are several options here: Combine the strings through GTM. For example, looks like you have the following dataLayer:

Tracking WP Post Tags using Google Analytics and dataLayer (GTM)

雨燕双飞 提交于 2019-12-25 08:25:14
问题 I set the dataLayer variable with the post author, tags and categories data. All these were already created as custom dimensions on Analytics. The problem is that Post Tags and Categories are arrays, Do I have to split the arrays on Google Tag Manager? (Or something like that, IDK). I did a test with Post Categories setting up pageCategory[0] as Data Layer Variable Name (Because I need only the first category) but It's not working good. The dataLayer looks like this: { "pagePostType":"post",

Google Analytics and Tag Manager, support for custom page paths?

馋奶兔 提交于 2019-12-25 08:17:28
问题 Just starting with Google Tag Manager. In my analytics setup I am sending custom page paths to canonicalize or "unify" the page path since in the web app there can be many different URLs for the same page. Example: /?action=view /view /view_page and in my GA for that page I'm sending: ga('send', 'pageview', '/view'); I can't figure out how to set this up with GTM. I have access to the server side so I can make any necessary changes there. I tried setting it in the dataLayer link this: <script

GTM doesn't recognize my dataLayer but console does?

我的梦境 提交于 2019-12-25 08:00:50
问题 So I have a dataLayer created that works just fine when using the console in Chrome: In Google Tag Manager, this dataLayer doesn't exist. Why? The code I've used is below: <script> <?php global $woocommerce; $items = $woocommerce->cart->get_cart(); $dataLayer = []; foreach($items as $item => $values) { $_product = $values['data']->post; ?> <?php $dataLayer[] = [ 'itemUnitID' => $_product->ID, 'itemUnitPrice' => get_post_meta($values['product_id'] , '_price', true), 'itemQuantity' => $values

How to get user surfing statistics?

早过忘川 提交于 2019-12-25 07:27:45
问题 This question is connected with Get user data collected by Google tag manager in order to make it more concrete. I have a Ruby-on-Rails web application. Assume, that some user comes to my site, surfs several pages and then sends me a feedback through feedback form. Is there any way to gather such information like: which keywords led user to my site what pages did he visited on my site and for how long any other surfing statistics, that could be interesting in order to send it together with

set up dtm and analytics on a new website

僤鯓⒐⒋嵵緔 提交于 2019-12-25 06:55:03
问题 I have a 3 page website. I want to know how many unique visitors visit each page of the website. That is how many unique visitors in page A, and from page how many reach page B and from page B how many reach page C. I am unable to determine or understand how the eVars and success events will be set in this scenario. Please help. 回答1: This can be accomplished quickly using the default path reports in Adobe Analytics. This "out of the box" report will show you a "fall out" of visitors who

Can anyone help implementing Nuxt.js Google Tag Manager with function based id

故事扮演 提交于 2019-12-25 01:14:02
问题 I installed and add this code to my nuxt.config.js and it works perfectly fine. (Link to package) modules: [ ['@nuxtjs/google-tag-manager', { id: 'GTM-XXXXXXX' }], ] Now I am trying to implement instead of a static ID a function which will return an ID. I tried to add this lines into my nuxt.config. js but it is not working. Obviously I have to put it somewhere else or so... This is what I tried nuxt.config.js const code = '1234567' id: () => { return 'GTM-' + code } export default { ...

Page hiding snippet for Google Content Experiments

拟墨画扇 提交于 2019-12-24 09:59:25
问题 I am trying to get rid of flickering effect. I am using GTM + Google experiments API code as a GTM tag. I want to adapt Optimize's page hiding snippet in order to use it with Content Experiments. https://support.google.com/360suite/optimize/answer/7100284 <HTML> <HEAD> <!-- Page hiding snippet (recommended) --> <style>.async-hide { opacity: 0 !important} </style> <script>(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date; h.end=i=function(){s.className=s.className.replace