Skip to main content

Added consent listeners

· One min read

We’ve introduced automatic consent handling in the Lyftio script. This means you no longer need to implement custom callback logic to "activate" the Lyftio script upon user consent.

If you're using industry-standard consent frameworks like Google Consent Mode v2 or OneTrust, everything now works out of the box.

What Changed?

Previously, you needed to set up a callback to activate* the Lyftio script on visitor consent (*depending on project settings).

Now, the Lyftio script handles this for you automatically.


If you're using Google Consent Mode v2, the Lyftio script listens for updates to consent states. As soon as analytics_storage is granted, the script will automatically initialize.


OneTrust

For OneTrust users, the script checks the active consent groups via OnetrustActiveGroups.

Specifically:

  • The script looks for C0002 (Performance / Analytics cookies)
  • If consent is already granted, it initializes immediately
  • If not, it listens for the OneTrustGroupsUpdated event and waits until consent is given