Opt-out from tracking
You can give your users an option to opt-out of CrossEngage tracking by setting an opt-out cookie in user's browser.

About

To allow users to opt-out from CrossEngage SDK tracking, our library checks if there is an out-out cookie set in the user's browser. When a cookie is found, the library will not send any tracking requests even when corresponding functions are called, therefore no user actions will be recorded.
If the tracking library does not track user behaviour, it is unable to send any messages through the channels powered by our tracking library:
    Onsite Display
    Browser Notification
    Exit Intent
Please note that:
    By default all users visiting your pages for the first time are opted-in.
    Whenever a user opts-out, this is only valid for the browser they are using at that time. If a user revisits the website through a different browser or device, they will be considered opted-in by the tracking library for that browser / device.
    If a user clears their cookies, the opt-out cookie will be deleted and the user will be opted-in again.
    All cookies have expiration times. Opt-out cookies created through the tracking library have an expiration time of 2 years from the creation time.

Implementation

How to manage opt-out

You can either create and delete the opt-out cookie yourself or use our tracking library support functions.
To create the opt-out cookie yourself, you have to ensure that you use the exact name, otherwise our library will be unable to find it.
The name of the cookie is:
1
xng.tracking-opt-out
Copied!
1
xng.setTrackingOptOut([isOptedOut])
Copied!
Value
Type
Description
isOptedOut
boolean
Provide true to opt-out the user from the tracking (creates an opt-out cookie) or false to opt-in (deletes the cookie).
1
xng.optOutTracking()
Copied!
A convenient method to opt-out of tracking for the current browser, the same as using setTrackingOptOut(true).
1
xng.optInTracking()
Copied!
A convenient method to opt-in to tracking for the current browser, the same as using setTrackingOptOut(false).
1
xng.isTrackingOptOut()
Copied!
A method to check opt-out status for the current browser. Returns a boolean value: true if the opt-out cookie is present and false if not.

Examples

To opt-out a user, first you need to install XNG library on the page, where you want to initiate the opt-out, then call xng.optOutTracking().
To opt-in a user back, call xng.optInTracking().
Last modified 2yr ago