Skip to main content
All CollectionsRB2B OverviewTechnical Considerations
Considerations When Controlling RB2B's Functionality With Your Cookie Policy Banner
Considerations When Controlling RB2B's Functionality With Your Cookie Policy Banner
Updated over 4 months ago

In the modern digital landscape, respecting user privacy and adhering to cookie policies is paramount. Integrating tracking script functionality with user acceptance of cookie usage policies is a crucial step in ensuring compliance and maintaining user trust. Here's a guide to the best practices for achieving this integration effectively.

Best Practice: Tying Script Functionality to Policy Acceptance

Ensure Tracking Script Loads Only After Acceptance

The best practice is to ensure that your RB2B tracking script loads only after the user has accepted the cookie usage policy. This approach guarantees that cookies are only written once the user has given explicit consent, maintaining compliance and user trust.

Steps to Implement This Best Practice

Initial Page Load:

  1. Do not load the tracking script: On the initial page load, refrain from loading the tracking script.

  2. Display a cookie usage policy banner: Inform users about the use of cookies and request their consent.

User Interaction with the Banner:

  1. Dynamic Script Loading: If the user accepts the policy, dynamically load the tracking script.

  2. Event Listeners: Use event listeners to detect the acceptance action (e.g., clicking the "Accept" button).

Script Execution Post-Acceptance:

  1. Load Script After Acceptance: Once the script is loaded after acceptance, it can write cookies and identify the user as intended.

  2. Consent-Based Tracking: This ensures that all tracking and cookie writing occur within the bounds of user consent.

Avoiding Bad Practices

Loading the Script and Deferring Cookie Writing

A common but flawed approach is to allow the tracking script to load on the initial page visit but defer the writing of cookies until the user accepts the policy. This method has significant drawbacks:

  1. Script Behavior Dependency: If the script relies on writing cookies during its execution, delaying this action can disrupt its functionality.

  2. Missed Identification Opportunities: If the user accepts the policy after the script has already executed, the script may not attempt to write cookies again, leading to missed identification and tracking opportunities.

Recap

Tying the functionality of your tracking script to the user's acceptance of the cookie usage policy is essential for compliance and maintaining user trust. By ensuring that the script loads only after acceptance, you can avoid functionality issues and ensure proper tracking and identification. Implement this best practice to enhance user experience and adhere to privacy regulations effectively.

Did this answer your question?