Documentation

What's New in Our L&D Platform

Cookie Conditional Feature

Layout and Design Tool Feature


The L&D Cookie Conditional Feature enables the creation of dynamic, personalized user experiences by scanning for a specific cookie, rebelmouse_variant. This cookie can take one of eight values (a, b, c, d, e, f, g, h), allowing you to deliver customized content or layouts based on the value assigned.

What Does It Enable Clients to Do?

This feature allows clients to:

  • Create tailored user experiences by defining logic based on the value of the rebelmouse_variant cookie.
  • Simplify complex layout configurations by wrapping elements in conditional statements.
  • Use JavaScript to dynamically set cookie values and modify experiences in real-time.

How to Enable It for Your Site

This tool isn’t activated by default. To enable it, please reach out to our team at support@rebelmouse.com.

Keep in mind that there are certain scenarios where this tool may not be compatible with other features, so some conditions might apply.

How to Use It

1. Create a Custom Experience Based on the Cookie

You can define logic for different user experiences using the Conditional Element or Multiple Conditional Elements. Below are examples of how to implement these conditionals:

Single Conditional Example:

Multiple Conditional Example:

2. Setting Up Cookies to Create Variations

To implement this feature, follow these steps:

  1. Set the Cookie Dynamically: Use JavaScript to set the rebelmouse_variant cookie for a user. Example:
document.cookie = "rebelmouse_variant=a";
  1. Assign a value (a, b, c, etc.) based on your logic or user segmentation.
Apply Real-Time Changes: When the cookie value changes (e.g., due to user interaction), dynamically update the user’s experience using JavaScript or propose a page reload for seamless application of the new layout.

Example Use Case: Creating Tailored Layouts

Scenario: You want to provide different layouts for users based on predefined segments.

  1. Set the rebelmouse_variant cookie: Assign a value to the cookie for a user based on your segmentation logic:
document.cookie = "rebelmouse_variant=b";

2. Wrap elements in conditionals: Use the conditional statements to ensure the correct layout or content is shown:

3. Adjust dynamically: Update the cookie value dynamically as needed to change the user’s experience in real-time.

With this feature, you can create a highly personalized site experience for your users by simply setting and reading the rebelmouse_variant cookie.

Table of Contents