Search code examples
google-tag-manageruniversal-analyticsgoogle-datalayer

Google Tag Manager: cannot see Data Layer property value in tag


I added to all my pages the following:

    <!-- Google Tag Manager Data Layer -->
<script>
dataLayer=[{'author': 'abc'}]
</script>
<!-- End Google Tag Manager Data Layer -->

I set up in Google Tag Manger the following Variable:

Data Layer Variable

so that I get to this situation:

enter image description here

Then I set my Universal Analytics tag as follows:

enter image description here

The tag is set up in order to be fired at every page view. When I reload the page I see that my Data Layer contains the "author":

enter image description here

But if I check the tag in Google Tag Assistant I don't see the expected field.


Solution

  • 'Author' is not a valid Google Analytics field. I don't know offhand all the valid fields, but they include 'page', 'cookiedomain', 'allowLinker' - 'author' certainly isn't one of them. You might want to try defining a custom dimension in your property settings and setting the value of that with the author.