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:
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?
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 || ;
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.