The data layer is a JavaScript object on a page that is rendered dynamically. Server-side script passes bits of data, such as title, author, publish date, etc. in the case of a blog post, to this object. From there, Google Tag Manager can serve it up to Google Analytics to create custom dimensions (allowing us to measure additional things like which author is more popular) and create article schema (allowing us to serve metadata to Google search engine results pages).
Ideally, we should serve the following information to the data layer for each post.
The data layer is a JavaScript object on a page that is rendered dynamically. Server-side script passes bits of data, such as title, author, publish date, etc. in the case of a blog post, to this object. From there, Google Tag Manager can serve it up to Google Analytics to create custom dimensions (allowing us to measure additional things like which author is more popular) and create article schema (allowing us to serve metadata to Google search engine results pages).
Ideally, we should serve the following information to the data layer for each post.
Here's more info on the data layer and schema.