Guided Recommendations Tracking
Preferabli relies on browser localStorage for performance, analytics and functional data collection and tracking. Each of the Preferabli plugins utilizes an Opt Out Tracking function to disable localStorage. In the case of an opt-out cookie/privacy policy, you can switch the opt_out_tracking setting from false to true when the user elects to opt-out. In the case of an opt-in cookie/privacy policy, you can initialize the plugin with opt_out_tracking set to true by default, and then switch the setting to false when the user elects to opt-in.
Opt Out Tracking
Option: opt_out_tracking
Type: Boolean
Default: false
Description:
Allows you to opt a user out of tracking based on cookie consent or privacy preferences.
When enabled, tracking-related data will not be collected for the session.
This is typically triggered after a user declines cookies or opts out via a privacy control.
Example:
$(%DIV_ELEMENT%).preferabliGR({
...configuration_settings,
opt_out_tracking: true, // disable tracking on initialization
});
//
$(BUTTON).on('click', function() {
$(%DIV_ELEMENT%).preferabliGR('optOutTracking', false); // to enable tracking after tracking policy accepted
});Notes:
- Can be toggled dynamically after initialization
- Recommended to integrate with your site's cookie consent manager
- Applies to all instances of Preferabli Widgets
Updated about 3 hours ago
