customCrossDomainLinkVisitorIdGetter
The customCrossDomainLinkVisitorIdGetter() method sets a function that fetches the visitor ID from the page URL if customCrossDomainLinkDecorator() is set. The default implementation reads visitor ID from a URL query parameter passed between domains when they are linked with enableCrossDomainLinking().
Syntax
customCrossDomainLinkVisitorIdGetter(urlParser)
customCrossDomainLinkVisitorIdGetter(urlParser): void
customCrossDomainLinkVisitorIdGetter(urlParser): void
customCrossDomainLinkVisitorIdGetter(urlParser): void
customCrossDomainLinkVisitorIdGetter(urlParser): void
customCrossDomainLinkVisitorIdGetter(urlParser): void
customCrossDomainLinkVisitorIdGetter(urlParser): void
Parameters
urlParser (function, required)
Extracts the visitor ID from the page URL.
urlParser(url, name)
The urlParser() method accepts a URL and name, and then returns the visitor ID.
url (string, required)
The page URL.
name (string, required)
The parameter name that holds the visitor ID.
Returns
The visitor ID extracted from the page URL.
Format: Example: c52b5d0969220761
Type: string
Example
_paq.push(["customCrossDomainLinkVisitorIdGetter", function (url, name) {
return (new URL(url)).searchParams.get(name) || "";
}]);
CrossDomainTracking.customCrossDomainLinkVisitorIdGetter(function (url, name) {
return (new URL(url)).searchParams.get(name) || "";
});
CrossDomainTracking.customCrossDomainLinkVisitorIdGetter(function (url, name) {
return (new URL(url)).searchParams.get(name) || "";
});
CrossDomainTracking.customCrossDomainLinkVisitorIdGetter(function (url, name) {
return (new URL(url)).searchParams.get(name) || "";
});
CrossDomainTracking.customCrossDomainLinkVisitorIdGetter(function (url, name) {
return (new URL(url)).searchParams.get(name) || "";
});
CrossDomainTracking.customCrossDomainLinkVisitorIdGetter(function (url, name) {
return (new URL(url)).searchParams.get(name) || "";
});
CrossDomainTracking.customCrossDomainLinkVisitorIdGetter(function (url, name) {
return (new URL(url)).searchParams.get(name) || "";
});
Related methods
Updated 6 days ago