enableCrossDomainLinking
The enableCrossDomainLinking() method enables domain linking and cross-domain visitor recognition. The visitor who goes from one site to the other will be recognized as the same visitor. Sessions that would be treated as separate for each site will be treated as one session.
This method needs to be preceded with setDomains().
Syntax
enableCrossDomainLinking()
enableCrossDomainLinking(): void
enableCrossDomainLinking(): void
enableCrossDomainLinking(): void
enableCrossDomainLinking(): void
enableCrossDomainLinking(): void
enableCrossDomainLinking(): void
Examples
To recognize visitors across two domains example.com
and example-two.com
:
// Set the domains to be tracked as a single site or app. Use the same tracking code for these domains.
_paq.push(["setDomains", ["example.com", "example-two.com"]]);
// Enable recognizing visitors across domains.
_paq.push(["enableCrossDomainLinking"]);
// Set the domains to be tracked as a single site or app. Use the same tracking code for these domains.
ClientConfiguration.setDomains(["example.com", "example-two.com"]);
// Enable recognizing visitors across domains.
CrossDomainTracking.enableCrossDomainLinking();
// Set the domains to be tracked as a single site or app. Use the same tracking code for these domains.
ClientConfiguration.setDomains(["example.com", "example-two.com"]);
// Enable recognizing visitors across domains.
CrossDomainTracking.enableCrossDomainLinking();
// Set the domains to be tracked as a single site or app. Use the same tracking code for these domains.
ClientConfiguration.setDomains(["example.com", "example-two.com"]);
// Enable recognizing visitors across domains.
CrossDomainTracking.enableCrossDomainLinking();
// Set the domains to be tracked as a single site or app. Use the same tracking code for these domains.
ClientConfiguration.setDomains(["example.com", "example-two.com"]);
// Enable recognizing visitors across domains.
CrossDomainTracking.enableCrossDomainLinking();
// Set the domains to be tracked as a single site or app. Use the same tracking code for these domains.
ClientConfiguration.setDomains(["example.com", "example-two.com"]);
// Enable recognizing visitors across domains.
CrossDomainTracking.enableCrossDomainLinking();
// Set the domains that are tracked as one site or app. Use the same tracking code for these domains.
ClientConfiguration.setDomains(["example.com", "example-two.com"]);
// Enable recognizing visitors across domains.
CrossDomainTracking.enableCrossDomainLinking();
Related methods
Updated 6 days ago