Cross-Domain Plugin

This plugin forces the visitor identifier to be used across domains in order to achieve cross-domain reporting. This allows the visitor to be represented as a single user no matter what domain they visited (assuming the plugin is used on both sites) This plugin adds either a query parameter or hash tag to the URL that is taking the visitor off the current site. The query parameter or hash contains the visitor identifier, and the new site will see the parameter and re-session the cookie in the new site to use the same visitor ID.

Plugin options

The plugin is loaded with the following properties available to be set via the configuration object:

Parameters Description Data Type Default Value

enable

Enable or disable the plugin 

Boolean

false

addIdTreatment

It allows you to set its value to either auto, hash, or parameter, with the default value being auto. 

auto - If enabled, the tag will automatically decide, if it should use a hash or query parameter. If enabled, then Param and Hash are ignored. If enabled, the tag will use hash by default but will switch to the query parameter, if the link has hash already.

hash - adds a hash to the link that contains the sessionization data. 

parameter - adds a query parameter to the link that contains the sessionization data. 

This configuration serves as a replacement for the previous three configurations, namely addHash,addParam, and autoSelect and these will be overwritten by the settings specified in the addIdTreatment configuration. In other words, the addIdTreatment config takes precedence over the individual settings of addHash,addParam, and autoSelect when it is enabled.

enum

auto

encode

Forces the sessionId to be base64 encoded 

Boolean

true

blockCollect

This option forces the Oracle CX Tag to wait until the plugin loads before data collection can begin.

Boolean

 

allowListSelector

CSS selector to be used in determining what links to bind to. Standard CSS selectors can be used to target certain domains or links if desired. 

'allowListSelector': 'A',

Below is the selector to allow list all foo.com and bar.com links

'allowListSelector': 'A[href*="foo.com"], A[href*="bar.com"]',

String

'A'

denyListSelector

If set to 'localhost' and onsite domains are defined on the tag config, the onsite list is used to form a denyList selector with all the domains listed, and 'A[href*="javascript:"]' is appended to the selector. If onsite domains are not defined, the selector is equivalent of ([href*="' + location.host + '/"],A[href*="javascript:"])' 'denyListSelector': 'localhost', 'denyListSelector': 'A[href*="google.com"], A[href*="facebook.com"]',

String

localhost

ignoreOnsiteDoms

Sets the plugin to not add the onsite-doms to the blacklist selector. 

Note: By default uses the _onsiteDoms setting from the CX Tag configuration, so you can specify what domains you consider locally.   By default it uses the domain the tag is loaded on.

Boolean

false

guard

Guard character to be added after the hash in case someone tries to add more data after the hash. Used to determine the end of the sessionId hash parameter. 

Note: This does not need to be changed. 

String

~

addHash

Flag to add a hash to the link that contains the sessionization data.

Note: The current configuration is no longer supported and has been deprecated. Please make use of the addIdTreatment configuration instead.

Boolean

true

addParam

Flag to add a query parameter to the link that contains the sessionization data. 

Note: The current configuration is no longer supported and has been deprecated. Please make use of the addIdTreatment configuration instead.

Boolean

false

autoSelect

Flag. If enabled, the tag will automatically decide, if it should use a hash or query parameter. If enabled, then addParam and addHash are ignored. If enabled, the tag will use hash by default but will switch to the query parameter, if the link has hash already.

Note: The current configuration is no longer supported and has been deprecated. Please make use of the addIdTreatment configuration instead.

Boolean

false

whiteListSelector

CSS selector to be used in determining what links to bind to. Standard CSS selectors can be used to target certain domains or links if desired. 

'whiteListSelector': 'A',

Whitelist sites selector white list all foo.com and bar.com links

'whiteListSelector': 'A[href*="foo.com"], A[href*="bar.com"]',

Note: The current configuration is no longer supported and has been deprecated. Please make use of the allowListSelector configuration instead.

String

'A'

blackListSelector

If set to 'localhost' and onsite domains are defined on the tag config, the onsite list is used to form a blackList selector with all the domains listed, and 'A[href*="javascript:"]' is appended to the selector. If onsite domains are not defined, the selector is equivalent of ([href*="' + location.host + '/"],A[href*="javascript:"])' 'blackListSelector': 'localhost', 'blackListSelector': 'A[href*="google.com"], A[href*="facebook.com"]',

Note: The current configuration is no longer supported and has been deprecated. Please make use of the denyListSelector configuration instead.

String

localhost

Learn more

Infinity Module Plugins