What is a dataLayer?

On the very basic level you can control your tags using URL rules. This can include several use cases however sometimes you need more control over where and when to fire a tag.

The so called Data Layer can connect your website with your Google Tag Manager container and let you fire your tags on certain special conditions. The Data Layer is a list of key-value pairs. You can define the key and the values as you wish. You can include the current page’s title, the users logged in status, product details, actually anything that is not connected to anyone’s personal data.

Remember: you can not use any Google product to track individual users. You can not include an email address in your Data Layer if this describes the currently logged in user. In general, you can not include any kind of personal identity information.

The Data Layer is actually a JavaScript variable that holds those key-value pairs. It is a tube between Google Tag Manager and your website. See what Data Layer variables can be accessed using this plugin.