Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I've a node referencing another node via an entity reference. I want the title of the second node as a custom dimension of the first node.
I have the following token setup:
[node:node-reference:title]
The title correctly is sent over but it is HTML Encoded, for example ampersands in the second node title show up as & in Google Analytics dashboard.
Comment | File | Size | Author |
---|---|---|---|
#2 | googleanalytics-2656724-1.patch | 631 bytes | johnennew |
Comments
Comment #2
johnennew CreditAttribution: johnennew at Deeson commentedThis is one way to solve it but I don't know if this is correct for all cases, another way might be to add a callback function to the options array of the token_replace function then add a drupal_alter in there to allow site builders the option to decide if they want to change the values themselves.
Comment #3
hass CreditAttribution: hass commentedTry using raw values. Not sure why it is html encoded. Maybe you need a custom display for tokens to get rid of this
Comment #4
hass CreditAttribution: hass commented