Allow deferred usage, as with a cookie consent system

Created on 27 May 2025, about 1 month ago

Some sites have a legal requirement to allow users to reject certain types of cookies.

For example:

(1) A visitor visits the home page of a site
(2) The visitor is presented with a modal asking them to accept all, none, or certain types of cookies

Currently this module does not provide a mechanism to only load once cookies have been accepted.

One possibility would be to have an option which would:

* OPTION 1: load the a/b testing script in the head of the html (this is the default behaviour)
* OPTION 2: provide a function abjs()

If the default OPTION 1 is selected, then we will function as we do now.

If the option 2 is selected, then instead of running the script right away, we will provide a function called abjs(), and do nothing until that function is called by the site code.

If someone has some sort of cookie consent system, then they could select option 2, and then in custom code, only run abjs() if and when cookies are accepted.

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇨🇦Canada alberto56

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024