Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Cross domain autolinking is described here:
https://developers.google.com/analytics/devguides/collection/analyticsjs...
From Google:
To simplify the cross domain linking process, we've developed the autoLink plugin to automatically implement cross domain linking across all the links on a page. Now site owners have a simple way to implement cross domain linking.
Add code to support this to allow cross domain tracking
Comment | File | Size | Author |
---|
Comments
Comment #1
johnennew CreditAttribution: johnennew commentedPlease find a patch for this attached for review.
Comment #2
johnennew CreditAttribution: johnennew commentedComment #4
hass CreditAttribution: hass commentedHave you seen http://drupalcode.org/project/google_analytics.git/blob/refs/heads/7.x-2... ? Please do not overcomplicate the code. There is no need for an extra function and the rest could be a one liner. Update of JS part is missing. Aside, 8.x need to be done first.
Comment #5
johnennew CreditAttribution: johnennew commented*Update of JS part is missing.* - I don't know what this means.
I'm not sure that everyone would agree that multiple small functions is more complex than single monolithic function, but its your module.
I am not up to speed with D8 - this works for me in D7, hope it helps someone who is...
Comment #6
hass CreditAttribution: hass commentedThis cannot work and it has failing tests. JS part is at http://drupalcode.org/project/google_analytics.git/blob/refs/heads/7.x-2...
I just said, what you are doing on 4 lines can be done in one and than do not need a function and setting several variable. We use functions if we can reuse them somewhere :-)
Comment #9
hass CreditAttribution: hass commentedCommitted two patches. I hope it works, but it's not tested.