Get current state
Use the get_tracking_optout()
function to get the current state of tracking opt-out for the current user. Use this to check whether a customer has opted out of tracking or not.
ADDWISH_PARTNER_NS.api.user.get_tracking_optout(); // Returns a boolean
Example
var optout = ADDWISH_PARTNER_NS.api.user.get_tracking_optout();
Where optout
is a boolean indicating if the user is currently opted out of tracking.