1. select 'Multiple top-level domains' in Google Analytics module settings
2. configure 2 domains: test.loc, test.com
3. configure CDN aliases to download static files within st.test.loc (=test.loc) & st.test.com (=test.com)
===
Behavior A. Google linker (googleanalytics.module, line 314, 'ga("linker:autoLink", ...') will interpret all sub-domains as internal links and will mark them with tracker ID.
Behavior B. Google Analytics module (googleanalytics.js, line 110, 'var isInternal = new RegExp(...') will interpret only current domain as internal link.
Expected: similar behavior for both systems - either sub-domains are not tracked in both systems or tracked in both. I prefer the second variant.
===
Behavior A. When link to ZIP file belongs to current domain - download event is tracked.
Behavior B. When link to ZIP file belongs to different domain from the group - download event is NOT tracked.
Expected: When link to zip file belongs to domain from the group - download events should be tracked.
Comment | File | Size | Author |
---|---|---|---|
#4 | Inconsistent-multi-domain-behavior-2384595-4.patch | 4.07 KB | travelertt |
google_analytics.module.patch | 4.27 KB | ursaj | |
Comments
Comment #1
hass CreditAttribution: hass commentedTry 2.1 or dev.
Comment #2
travelerttThis is still an issue. Right now downloads held in a S3 bucket with a different subdomain are being treated as Outbound links.
Comment #3
travelerttComment #4
travelerttHere is a reroll of the original patch for 7.x-2.x-dev.
Comment #5
travelerttComment #7
hass CreditAttribution: hass commentedAdd the bucket name to your hostname list.
Comment #8
travelerttDoesn't work. Current the current 7.x-2.x-dev version considers the download link to be external.
Debug response says "Internal link 'http://subdomain.example.com/path/to/example.mp4' clicked, not tracked".
subdomain.example.com is listed in the "List of top-level domains".
Line 15 considers link not to be internal,
if (Drupal.googleanalytics.isInternal(this.href)) {
So it never reaches the download event.Comment #9
hass CreditAttribution: hass commentedOk, got it. But better than adding the condition everywhere we should add this inside isInternal() to make this a real API function that can be reused.
What is the before and after?
"^(https?):\/\/(?:.+\\.)?"
Comment #10
travelerttIt would be best if it reflected whatever the value of domain tracking scope was set too. But for my particular use case, we have the files at streaming.foo.org and files.foo.or. The main site is at www.foo.org. So, everything with the url of *.foo.org would be considered internal if the domain tracking was set to One domain with multiple subdomains.
Comment #11
hass CreditAttribution: hass commentedJepp
Comment #14
hass CreditAttribution: hass commentedComment #15
Londova CreditAttribution: Londova commentedHi,
Is there any update for this issue?
Comment #16
japerryWith the sunset of legacy google analytics, the 8.x-2.x module is now unsupported. If this is still an issue with the 4.x version, please file a new issue in the queue.