/r/GoogleTagManager

Photograph via snooOG

For discussion and questions about Google Tag Manager.

/r/GoogleTagManager

10,338 Subscribers

1

Custom HTML Tag ELI5

I'm semi-desperate here! For background, I am SUPER new to GTM and have pretty much no knowledge of coding. I'm a marketing/coms professional.

Background: My org is running an advertising campaign and our outside contractor wants to track sales that have come from their ads. I have GTM integrated with our ticketing platform XTruLink, so that's one thing done. I've been given a pixel/conversion tracking code and need to set it up as a custom HTML tag in GTM. Should I just create a new custom HTML tag and copy/paste the pixel code? Is it as simple as that or do I need any additional code?

The second (and I think larger) issue is that I'm getting so confused on how to determine a trigger. I want to capture every time that someone purchases tickets for this one event on our ticketing platform.

The pixel is from Stack Adapt, if anyone is familiar. I know this is all probably super basic, but I would be so grateful for any help!

1 Comment
2024/11/13
22:53 UTC

1

Using RegEx for Parameter Value in Google Tag Manager

I am trying to consolidate some of my Meta conversion events. I have two different conversion points I am adding under one conversion. The issue I have is that to pass customer information they have two different variable triggers.

I set up RegEx in the parameter value section, it looks like this "{{USP - Automatic Collection}} | {{URL VAR - Email - Contact Us}}"

When I test it the value, the first part of returns nothing, while after the pipe symbol the email gets passed through. I guess what I am wondering is if RegEx works here. Will GTM only pass the variable with the email. Or will it pass the whole string, therefore messing with the data quality and matching.

Can't attach an image, but this is what the tag details return when I test in the values section:

[

{name: "em", value: "[object Object] | test@test . com"},

{name: "ph", value: ""}

I am wondering that if the [object Object] part of this will mess up with Meta's ability to match the email.

Thanks!

5 Comments
2024/11/13
20:29 UTC

1

User custom variables

Hey Everyone,

I have a client that would like to create custom user variables within their GTM instance off the data layer. They already have the variables created inside their GTM but my question is...do they need to be collecting said variables on the website within their data layer to allow them to pass back into GTM first?

One of the variables that they want to collect is users e-mail for a snapChat pixel.

Secondly, if e-mail is already within the data layer, do they need to use the same data layer variable e-mail within GTM so it matches?

Appreciate any help you can provide.

Ty~

2 Comments
2024/11/13
14:21 UTC

1

DataLayer variable (type number) problem

I have 2 variables available in dataLayer:

var1 - string

var2 - number

I'm having trouble using the variable var2 (regardless of whether it's in the format xx (e.g., 10) or xx.xx (e.g., 12.34)) in a tag that uses custom HTML code. Code:

<script>
gtag('event', 'purchase', {
  transaction_id: '{{var1}}',
  value: {{var2}}
 });
</script>

In debug mode, the variable values are correctly assigned (var1 as a string, var2 as a number), and they are available before the container loads. However, checking the result, it turns out to be:

<script type="text/gtmscript">gtag("event","purchase",{transaction_id:"ID123456",value:google_tag_manager["rm"]["171208710"](6)});</script>

When I define value as a string (value: '{{var2}}'), I get:

<script type="text/gtmscript">gtag("event","purchase",{transaction_id:"ID123456",value:"10"});</script>

If I use the variable {{var2}} as a conversion value in a Google Ads conversion tag or as a parameter value in a GA4 event, the value is correctly assigned. What could be the reason for this issue?

5 Comments
2024/11/13
13:05 UTC

3

switching from gtag.js to GTM - big drop in GA4 sessions

I am a marketing professional struggling with a change in GA4 since I asked our web team to switch from gtag.js to GTM and wondering if anyone has similar experience and / or a fix!

I’ve noticed that GA4 has suggested we’ve dropped in terms of website visitors by 50% compared to the month before. It looks like we had a big dip around late September when the GTM switch went live and we haven’t recovered.

This also doesn’t appear to show in other platforms. While GA4 suggests a 50% drop in organic search visits, Google Search Console indicates we’re doing better than ever, up 10% on that period, with no dip in clicks through to our site. 

I am a bit lost as to next steps. I can’t see anything about GA4 changes or updates - what could be affecting us here? Is there a possibility that our tag or GTM has been set up incorrectly?

9 Comments
2024/11/13
11:00 UTC

2

GTM Tag firing but not sending hits to GA4

I have a tag that tracks clicks based on button text clicks on this website https://dumpsterrentalcolumbusohio.net/ I have tested it in the preview GTM tab and it fires perfectly but when I view GA4 it registers the tag but no hits are being send and resulting in the custom event not populating in GA4 at all. I am confused because I set this up with no problem on another website but having issues here.

Trigger -
https://dumpsterrentalcolumbusohio.net/wp-content/uploads/2024/11/Screenshot-2024-11-12-160505.png

Tag -
https://dumpsterrentalcolumbusohio.net/wp-content/uploads/2024/11/tag1.png

Preview GTM-
https://dumpsterrentalcolumbusohio.net/wp-content/uploads/2024/11/preview1.png

Preview GA4-
https://dumpsterrentalcolumbusohio.net/wp-content/uploads/2024/11/Screenshot-2024-11-12-160849.png

14 Comments
2024/11/12
21:14 UTC

3

Has consent banner implemented in GTM significantly increased the bounce rate of your landing page?

Hi. To make a long story short, I tried to implement a Cookie Script consent banner in GTM (Google Tag Manager) that only appears for customers in the UK and EU. I am finding out that this doesn't work well, because many conversions outside the UK and EU are not being counted in Google Ads (the technical reason is because "Default Consent (Global)" being set to "Denied" for my Cookie Script GTM tag settings and Google Ads support says it must be set to "Denied" after I talked with them).

My original plan was to only show the consent banner in the UK and EU (and/or other regions where it's mandatory). But because some conversions outside the UK and EU are not being counted in Google Ads, the only way to address this situation is to show the Cookie Script consent banner to all my customers around the world, and the consent banner also probably needs to cover most of the landing page, to force an "Accept" all cookies or "Reject" from the customer (hopefully I can get most customers to "Accept" the cookies).

Now my questions is, after you put up a consent banner that took up most of the landing page to force an "Accept" all cookies or "Reject" it from the customers, how was your bounce rate on your landing page? Did the bounce rate on your landing page increase significantly after you put up a consent banner ? Or did the bounce rate only increase slightly and the consent banner didn't stop many customers from browsing your website?

3 Comments
2024/11/12
14:22 UTC

1

Conversion Confusion

my account manager told me its better to create the conversoin goals in GTM first, then set up as primary goal in GA4 and then link to G Ads.
is that wrong?

3 Comments
2024/11/12
11:23 UTC

1

User_data not send to Meta

Hey guys

I just got a new e-commerce client and setup client + server-side tagging without any issues, the tags are firing etc. however facebook does not receive any user_data even though I have setup everything as I should with facebookarchive meta pixel in the client side tag manager and the facebook conversion API tag by stape.io.

Facebook does receive conversion data like: content_ids, value, currency from pixel and conversions api. So only the user_data is missing... And I want that EMQ to go up.

Anyone knows what the issue might be? :)

4 Comments
2024/11/12
07:22 UTC

1

Balise Google : GTM-XXXXXX introuvable

Bonjour, lorsque j'essaie de prévisualiser/voir si GTM se déclenche correctement, j'obtiens l'erreur - Google Tag : GTM-XXXXXXX introuvable . voir image : https://ibb.co/RbwTb7n / https://ibb.co/YWw1sKn

GTM est implémenté via GTM4WP et est activé. En regardant le code source, je retrouve bien GTM-XXXXXX donc je ne comprends pas trop.. pouvez-vous m'aider ? merci !

2 Comments
2024/11/11
23:51 UTC

2

Tracking Google Ads Conversions on HubSpot landing pages

I have set up Google Ads conversion tracking through GTM on our website.

What I'm wondering is will conversions still be tracked on our HubSpot landing pages - the URL of which would be resource.[website domain].com?

7 Comments
2024/11/11
15:48 UTC

2

Any kind soul can help me to properly set my Google tags?

I have a one button that I want to set as a google ads conversion.

I also want to record that button click in my google analytics .

I have created the tag, and it even fires the event and the "Google ad conversion" is triggered, but google Ad shows I have no conversions so far, even if I had a one conversion today.

All this process is new to me, and I got lost/confused, even though I've watched bunch of tutorials.

Whoever is willing to help me to clarify/setup my google tag manager, please let me know and I will provide further details.

Thanks in advance.

6 Comments
2024/11/09
21:20 UTC

1

How to create trigger based on page url - for Server-sided GTM | Need Help!

👋 Hey All!

Am kinda new to server-sided GTM, seeking how to setup a trigger based on specific webpage url/part of url etc.

Use case - Client side gtm isnt working on website during checkout phase therefore unable to send data from client to server side.

Any help would be appreciated.

5 Comments
2024/11/09
14:15 UTC

0

Setup Google Tag now my GA4 data is only going to Google Tag manager and not collecting any data in GA4.

I just setup Google tag in drupal 10. I was not aware that once I setup Gtag manager that my GA4 data would be transferred to only being collected through tag manager. The system is telling me to turn off the GA module since I am using the tag manager module. If i had to choose I'd rather use GA4, but cannot figure out how to remove Google tag manager without screwing up GA4 data. I've checked all kinds of how-tos but haven't found anything to help. I would welcome any suggestions or direction to help. At this point neither are working for me.

2 Comments
2024/11/08
20:51 UTC

1

Tracking Live Chat Button

Trying to track a live chat button on my homepage, but GTM isn't registering it as a click at all in preview and I can't figure out why? There is a live chat button in the navigation on all other pages that works.

8 Comments
2024/11/08
20:45 UTC

0

How to disable cookiebot fron GTM

So I decided to remove the cookiebot, because my google ads account and analytics aren’t showing conversions anymore. And i want to remove it. I don’t have big knowledge with GTM. ( I setup my conversion with youtube tutorials same with cookiebot). Btw someone should make a youtube tutorial on how to remove cookiebot for ppl like me 🤣

Should I delete all tags and triggers I’ve created? Or there is another way.

9 Comments
2024/11/08
20:10 UTC

1

GTM Missing Some Conversions

Hi,

I use Google Tag Manager to track my google ad conversions but it always misses some. Yesterday I got 2 form submission conversions but only 1 was tracked. It frequently misses 1, 2 or maybe even 3 a month and this is very frustrating because I only get about 8 a month total.

I have it set up so it triggers on Page View checking for a "thank-you" in the URL which is the form submission thank you page.

Can anyone help me?

Thanks

19 Comments
2024/11/08
13:25 UTC

0

Event tags only firing in debug mode

SOLVED: "I would check you have publish access. There's another access, that looks the same but it doesn't actually publish."

I've tested new events (basic stuff like button clicks and form fills) in Debug mode and see the tags fire properly including showing up in GA4. I've had another consultant do the same (they built the tags and triggers).

Changes are published yet no event data is firing on our production site.

How would you troubleshoot this? I am looking to hire someone for this project too if it's more in depth than a quick tip.

9 Comments
2024/11/08
13:22 UTC

1

Custom javascript help needed

Hi javascript pros!

Could anyone help to modify this code to work with these types of datalayers?

Here's the code, it extracts the value of the item_id:

function() {
    // Find the correct ecommerce object in the dataLayer
    var ecommerceObject = null;
    for (var i = 0; i < window.dataLayer.length; i++) {
        if (window.dataLayer[i].ecommerce) {
            ecommerceObject = window.dataLayer[i].ecommerce;
            break;
        }
    }

    // Check if the ecommerce object and items array exist
    if (ecommerceObject && ecommerceObject.items) {
        var itemIds = ecommerceObject.items.map(function(item) {
            return item.item_id;
        });
        return itemIds;
    } else {
        // Return an empty array if ecommerce items are not found
        return [];
    }
}

Here is the datalayer:

dataLayer.push({

event: "view_item",

eventModel: {

currency: "USD",

value: 90,

items: [

{

item_id: "4524138",

item_name: "Blue car toy",

item_brand: "BoxToys",

price: 90,

quantity: 1

}

]

},

gtm.uniqueEventId: 268

})

Thank you!

13 Comments
2024/11/08
10:44 UTC

2

Google tag sending data to multiple destinations

I recently opened my google analytics and noticed the same google tag is sending data to two different GA4 properties. I am unable to remove the destination without adding it to an existing tag or creating a new one.

Does anyone know how to resolve this?

4 Comments
2024/11/07
13:06 UTC

1

My first campagne, issue with Google balise

Hello,

i created my first google ads campagn and in the overview section, i have this message :

The campaign you recently created is ready to show ads, but a problem may be limiting its performance

Users will start to see ads from the “XXXX” campaign you recently created. An impression will be counted each time an ad is displayed.

With the code :

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-11XXXX">
</script>
<script>

window.dataLayer = window.dataLayer || [];

function gtag(){dataLayer.push(arguments);}

gtag('js', new Date());

gtag('config', 'AW-11XXXX');

</script>

It say that i need to add a Google balise, something starting with "AW-11..." on my website.
I'm using 'Google Tag Manager' and i already added this google balise.

When i clic on "test connexion", it say :
Your Google tag has not been detected on your website. Follow the instructions, then try again.

I tried to see what is happenning with "Google Tag Assistant". And it seems that it is present as part of the tags in my gmt.

Thanks

2 Comments
2024/11/07
09:02 UTC

1

Event Per Visit

Hey,

Wondering if anyone knows the best way to do this, I want to fire an event only once when someone go to a site.

I was thinking about adding a variable to sessionstorage, then checking the variable is there before in the event, is there a simplier way?

10 Comments
2024/11/07
04:20 UTC

16

White house Google Tag Manager configuration is exactly what you should aim to avoid IMO

They literally track every click, from the ubiquitous "hamburger_opened" to the mysterious "form_input".

To me, there's no distinction between interesting, insightful interactions, that are meaningful to measure and more common ones. They just track everything that's available.

77 tags in total: 76 GA4 events, one Google Tag. For a content site.

Am I getting too harsh?

Report here: https://tagstack.io/scan?ssid=c014841c-034a-413c-8daa-84425e1a3495

12 Comments
2024/11/06
23:58 UTC

2

GTM tags dropping after "add to cart" click

Running ads for a newer ecom site and trying to get reddit ads live. setting up a conversion via the thank you page string. Have checked and ensured that the GTM is properly installed on all pages via theme.liquid. For some reason, anything after "add to cart" button is clicked, gtm drops and nothing is tracking. If anyone has any help troubleshooting that would be a huge help. Have screenshots showing the issue too. thanks

6 Comments
2024/11/06
16:01 UTC

1

Google tag manager console error

Hello, I was implementing phone call tracking with GTM, but after I did that I have an error message on console tab in GTM. Can someone tell me what this mean.

The error message is:
Tag blocked: {function: "__ogt_1p_data_v2", instance_name: "_Tagging Activity Tag 4 Named Tagging Activity 3", priority: 2, vtp_isAutoEnabled: true, vtp_autoCollectExclusionSelectors: ["list", ["map", "exclusionSelector", ""]], vtp_isEnabled: true, vtp_manualEmailEnabled: false, vtp_cityValue: "", vtp_autoEmailEnabled: true, vtp_postalCodeValue: "", vtp_lastNameValue: "", vtp_phoneValue: "", vtp_autoPhoneEnabled: false, vtp_emailValue: "", vtp_firstNameValue: "", vtp_streetValue: "", vtp_autoAddressEnabled: false, vtp_regionValue: "", vtp_countryValue: "", vtp_isAutoCollectPiiEnabledFlag: false, tag_id: 4}

7 Comments
2024/11/06
10:47 UTC

5

GTM Specialists - how do you define scope and billing for large, complex projects?

I have an upcoming project that's quite different from my previous projects.

Previously, I was able to define and break down the project into very specific sub-items and bill fixed sums for each sub-item (I would estimate how many hours it would take me and calculate the pricing based on that). For example - Ecommerce tracking - $X; Facebook pixel - $Y.

Now, for the current project, the client already has several apps integrated and is deploying them via GTM and api, including a CRM. Things are mostly working, but the problem is that the client encounters some errors on occasion and is worried about data integrity. My job would be to comb through everything, in multiple platforms, and identify these errors. It's difficult for me to define a super specific scope and fixed billing sum, because I feel like I won't know how long it's going to take until I've already done it, and I won't know what I'm looking for, until I find it. This sounds like hourly billing would fit more, but personally I don't love hourly billing.

What are your thoughts? What type of billing would you pick in this case/ in general in your day to day? And how would you approach figuring out the scope to avoid risk of scope creep?

8 Comments
2024/11/05
21:17 UTC

1

Conversion Linker isn’t tracking conversions

Hi all, we’re having issues with conversion linker

  1. We don’t have GA4 setup
  2. We run on two domains and 1 Tag manager container
  3. Domain 1 WP with Google Ads Tag implemented
  4. Domain 2 Shopify with Google App native conversions implemented
  5. Conversion linker with cross-domain tag implemented and firing on both domains

User journey - user clicks on domain 1 and then moves to domain 2 to complete a purchase, the purchase event doesn’t get track nor attributed only if user goes directly to domain 2

Anything wrong or missing in our setup? TIA 🙏

12 Comments
2024/11/05
17:00 UTC

3

GTM Tag Pulling Variable From Another Datalayer Event?!?

Haven't seen this before! Help!

Have GTM tags set to fire on a Product Detail Page, view_item datalayer event trigger. Trigger works correctly and tag fires at the correct point. On that event, datalayer contains the e-commerce product info for the one, correct product featured on that page. The variables in GTM preview for the event are correct, and what should be passed with the tags.

However - the tags are passing a contents array that includes multiple products. Two datalayer events later is a "view_item_list" event, and the datalayer there contains the products that are being passed. Trying to figure out why the tags on the "view_item" event, when the variables on that event are correct, would be passing variables from a datalayer event that happens after that (the view_item_list) event.

The only consideration is that the datalayer events aren't setup ideally on the website side (can't change it so have to work with it), and both "view_item" and "view_item_list" occur before the "Container Loaded" event where most "All Pages" base codes fire. So we used tag sequencing to ensure the base tags for Meta, Google, etc. fired before the view_item/ViewContent event.

Still not sure why when the trigger and variables and datalayer are all correct for the tag, it would pull values from another event that happens AFTER it. Let me know what you think!

6 Comments
2024/11/05
16:54 UTC

1

Container quality - urgent: Tag not placed correctly

I am seeing this warning Container quality - urgent: Tag not placed correctly. The affected pages are all checkout/order-received/ pages. They are all tagged and everything is working correctly but I want to update container quality and the warning to be gone. Can't find any good resources for the problem.

Would really appreciate some help!

Thanks

12 Comments
2024/11/05
14:51 UTC

1

Servidor propio

Alguien sabe de algún tutorial donde explique cómo crear un servidor PROPIO y poderlo conectar con Google Tag Manager.

No a través de google Cloud o las filiales de google que son carísimas.

En la empresa tenemos servidores propios pero en ciencia cierta no sabemos cómo conectarlos para convertirse en un contenedor server de GTM

1 Comment
2024/11/05
14:21 UTC

Back To Top