alooi14 / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 1 forks source link

linker:autoLink decorates too aggressively #580

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
My page is on domain....

http://a.parentdomain.com/mypage.html

and i have
ga( 'linker:autoLink', ['domain.com', 'otherdomain.com'] );

and links going to
http://www.parentdomain.com/something.html

are going to be decorated.

removing 'domain.com' from autoLink seems to stop this.
i think 'domain.com' matches my longest current domain (a.parentdomain.com) 
ending with the same string 

Original issue reported on code.google.com by ad...@dynamicplus.it on 6 Feb 2015 at 11:18

GoogleCodeExporter commented 8 years ago
in that case you should use a Regular Expression for matching. analytics.js 
supports this, see the documentation 
https://developers.google.com/analytics/devguides/collection/analyticsjs/cross-d
omain

Original comment by pfrise...@google.com on 6 Feb 2015 at 5:41

GoogleCodeExporter commented 8 years ago
ok...
but imho regexp is too expensive as i have to configure 40 domains.

could be setting of ".domain.com" (initial dot) a good solution?
i dont have any naked domain (only tld+domain name)

Original comment by ad...@dynamicplus.it on 6 Feb 2015 at 6:26