Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Google gtag Issue (Revisited)

Avatar

Avatar
Level 1
gymbobwe
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
gymbobwe
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
gymbobwe
Level 1

23-04-2021

In first seeking an answer to our particular issue, I first referenced the 2018 thread: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/google-gtag-issue/...; however, I decided that this places a different enough spin on the issue from that which everyone else was experiencing that it warranted its own thread.

 

This again regards the Adobe Launch Google gtag Extension, which in our case is throwing a persistent browser console error that we need to get to the bottom of. The browser console error is as follows:

 

Uncaught (in promise) Error: Failed to load script https://www.googletagmanager.com/gtag/js?id=AW-XXXXXXXXX&l=OurCompanyDivision-GoogleAds(AdWords)

 

In the above URL, the red-colored text is to mask the Adwords account number as well as the initial portion of the data layer name (which is assigned in the extension's "Provide custom data layer name" field); however, the later portion of the custom data layer name is not red-colored and is actually part of the assigned data layer name as set in the extension. I point this out because someone else other than me configured this extension, but I am the one who has to figure out why it's throwing this error.

 

So, in looking at this, the one thing I was wondering about is the syntax of the custom data layer name — that it contains parentheses. Would that possibly have anything to do with the error? If so, is there any logic in the Google gtag Launch extension which might validate against any ill-formed custom data layer names an unwitting user might input into the "Provide custom data layer name" field? If there isn't, I would suggest that there should be. Based on everything I've read about the Google Tag Manager, its overriding intent is to provide an easy way for non-admin types (i.e.: marketers) to manage Adwords and other Google tagging products — and one would assume that the Launch extension would reasonably seek to follow within that same premise under the umbrella of Adobe Analytics.

 

That said, I still need an answer! LOL Can anyone pinpoint whether the custom data layer name syntax might be the culprit?


Thanks in advance for your help!

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Springboard
MVP
yuhuisg
MVP

Likes

145 likes

Total Posts

475 posts

Correct Reply

90 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Establish
Contributor
View profile

Avatar
Springboard
MVP
yuhuisg
MVP

Likes

145 likes

Total Posts

475 posts

Correct Reply

90 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Establish
Contributor
View profile
yuhuisg
MVP

25-04-2021

The most common name for the data layer is "dataLayer". That's spelled with a small "d" and capital "L".

You can also view the web page's source code to find something like this:

var dataLayer = dataLayer || [];

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

You almost always never need to use a custom data layer name. It's really only needed in the rare case that the website is already using "dataLayer" for something else that is not compatible with Google's specification.

I'm not a developer of the extension, but I would guess that there's no error checking on the data layer name, because the client could really name it anything they want, e.g. "ohMyGoodness-ItsADataLayer". Using brackets would be really stretching it.

Try removing that custom data layer name and see what happens.