Good Morning,

I'm not able to see variables in the data layer on my taxonomy pages in the same way that I see them on my node pages. I only see the language and the user id on taxonomy pages where I see all the variables on nodes. Is this by design? Or a separate configuration?

Thanks

Comments

slsonnier created an issue. See original summary.

bighappyface’s picture

Status: Active » Closed (cannot reproduce)

@slsonnier I have taken a look at this issue and am not able to reproduce the symptoms you described.

Here is the process I went through:

1. Create a clean, temporary install of Drupal with datalayer installed using simplytest.me (https://simplytest.me/project/datalayer/7.x-1.1)
2. Log into the instance and verify datalayer is enabled
3. Add a new vocabulary
4. Add a new term to the new vocabulary
5. Navigate to the term page (e.g. https://dglzs.ply.st/taxonomy/term/2)
6. View the source of the HTML

When I follow those steps I see the following in the HTML source:

<script type="text/javascript">dataLayer = [{"entityType":"taxonomy_term","entityBundle":"my_vocabulary","entityId":"3","entityLabel":"baz","entityVid":"2","entityName":"baz","entityTaxonomy":{"my_vocabulary":{"3":"baz"}},"drupalLanguage":"en","userUid":"1"}];</script>

Again, this is using a base install with default configuration and default clean URLs for the term pages.

Please feel to re-open this issue if you are still encountering the symptoms you describe and can not find any resolution.