Question

I am working on a project where I am integrating analytics into a website. I am very interested in using a Data Layer like the one described in this article,

https://developers.google.com/tag-manager/devguide

However, this tutorial only defines how to use a data layer when using Google Tag Manager. If I am using a different tag manager, like BrightTag or OpenTag, is there anyway to hook Google Analytics into a Data Layer using just JavaScript?

Thanks! DS

Was it helpful?

Solution

OpenTag has it's own specification for a data layer - they call it "universal variable", specs are here: https://github.com/QubitProducts/UniversalVariable. Presumably BrightTag uses yet another format

Updated to add: Brighttag is now Signal and they do not seem to use a standardized format, they simply grab global variables - but of course you still can declare an object to create a pseudo-namespace and minimize naming collisions, and pick your values from that object

There seems to be no commom specification which would be compatible with multiple/all Tag Management Systems.

So yes, you can use some kind of data layer with other Tag Management Systems but it might be called differently and how it will be implemented depends on your platform of choice.

Updated to add: Also keep in mind that the GTM dataLayer does not just contain key/value pairs, the GTM code also overwrites the native push method for the dataLayer array. That might be a concern if you plan to use multiple tools that manipulate the dataLayer variable at once.

OTHER TIPS

Often times, tag managers allow full customisation over your Data layer variable. At least Google Tag Manager allows you to rename it: https://developers.google.com/tag-manager/devguide#renaming . If the other vendors are wise, they would probably allow this as well - in case of conflicting variable names.

There's no common standard to use across tag managers but W3C is working on a draft proposal for a standard data layer. It's worth checking out:

http://www.w3.org/community/custexpdata/

Presumably, if you follow this it should make switching to other tag managers easier in the future.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top