javascript - GTM event working but is not showing in Google Analytics Events, why? - Stack Overflow

I am trying to setup 1 click event to be fired in Google Analytics using the newest dataLayer object an

I am trying to setup 1 click event to be fired in Google Analytics using the newest dataLayer object and have it set to be triggered like so:

$('.vinyl-calc .calculate').click(function() {
    // some code here...
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({
        'event': 'calculatorClick',
        'calculatorType': 'vinyl'
    });
});

and

$('.silane-calc .calculate').click(function() {
    // some code here...
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({
        'event': 'calculatorClick',
        'calculatorType': 'silane'
    });
});

I created the dataLayer variable correctly in Google Tag Manager and the tag named, "Tools and Calculators" with the custom event calculatorType added to it, which as shown below is being triggered via Google Tag Manager:

and

However, going into Google Analytics, even in Realtime does not show any events happening here. I do not see anything at all in Google Analytics and can't seem to track this at all in Google Analytics. How to get the event calculatorClick showing in google analytics with the calculatorType variable???

I have been at this for hours trying all kinds of ways to get this working and nothing is working correctly. Some references I have followed that just do not work in Google Analytics are .4 and /

1st - Why is this soo plicated? And how to get GTM linked to GA correctly so that it is tracking events? Because there are currently NO events in GA and I've been triggering these click events all day.

Here is the Tag and triggers in Google Tag Manager that are LIVE: and here is the Tools and Calculators Tag Properties. I'm not sure what the Category, Action, Label, and/or Value properties are supposed to have in them, so I've been testing different values in here to try to get it to send to GA (which it does not).

I actually have 3 triggers on this so as to be sure it is working. I suppose I only need 1, but I wanted to be sure it was working in GTM.

I don't know where you get to the TAGS in Google Analytics however. I don't see any option for tags anywhere in GA. Only in GTM.

I am trying to setup 1 click event to be fired in Google Analytics using the newest dataLayer object and have it set to be triggered like so:

$('.vinyl-calc .calculate').click(function() {
    // some code here...
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({
        'event': 'calculatorClick',
        'calculatorType': 'vinyl'
    });
});

and

$('.silane-calc .calculate').click(function() {
    // some code here...
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({
        'event': 'calculatorClick',
        'calculatorType': 'silane'
    });
});

I created the dataLayer variable correctly in Google Tag Manager and the tag named, "Tools and Calculators" with the custom event calculatorType added to it, which as shown below is being triggered via Google Tag Manager:

and

However, going into Google Analytics, even in Realtime does not show any events happening here. I do not see anything at all in Google Analytics and can't seem to track this at all in Google Analytics. How to get the event calculatorClick showing in google analytics with the calculatorType variable???

I have been at this for hours trying all kinds of ways to get this working and nothing is working correctly. Some references I have followed that just do not work in Google Analytics are https://johannesmehlem./blog/google-analytics-event-tracking-via-google-tag-manager/#section3.4 and https://www.analyticsmania./post/pull-data-from-data-layer-google-tag-manager-tutorial/

1st - Why is this soo plicated? And how to get GTM linked to GA correctly so that it is tracking events? Because there are currently NO events in GA and I've been triggering these click events all day.

Here is the Tag and triggers in Google Tag Manager that are LIVE: and here is the Tools and Calculators Tag Properties. I'm not sure what the Category, Action, Label, and/or Value properties are supposed to have in them, so I've been testing different values in here to try to get it to send to GA (which it does not).

I actually have 3 triggers on this so as to be sure it is working. I suppose I only need 1, but I wanted to be sure it was working in GTM.

I don't know where you get to the TAGS in Google Analytics however. I don't see any option for tags anywhere in GA. Only in GTM.

Share Improve this question edited Jun 19, 2018 at 17:51 Solomon Closson asked Jun 18, 2018 at 21:10 Solomon ClossonSolomon Closson 6,22715 gold badges81 silver badges121 bronze badges 2
  • Can you post a screenshot of your GA tag? - the one that you want to fire on this event. – Matus Commented Jun 19, 2018 at 11:18
  • Does that help any? – Solomon Closson Commented Jun 19, 2018 at 17:51
Add a ment  | 

1 Answer 1

Reset to default 1

Each custom event in GA could have an Event Category, Event Action, and (optionally) an Event Label and Event Value

Now that I am not a superuser in GTM, I believe that you still need to map your data layer variables into the corresponding Google Event for that to show up properly within GA.

Google's Custom Event documentation
Google's GTM documentation


Updated GTM is just a way to help make it easier for developers to load data into GA or add custom scripts, etc. If you want to store them as GA events, you will need to understand how the GA Event works. That's why I include the Event documentation (which sadly refers to the dated ga method.) you can clearly see the eventCategory etc there.

  1. In GTM, you will need to set up data layer variable based on the event category you have pushed through.
  2. Then you create an Event and map those Event Category etc field to the corresponding datalayer variable.
  3. You then need to specify a trigger so that GA knows when to fire that event.

I believe the latest method is actually using the gtag. The default event snippet still uses the old ga syntax last time I checked.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745364249a4624502.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信