Skip to content
Lumexio
PrestaShop module · Guide

Connect your own consent tool

Lumexio records where each order comes from (Google Ads, Meta, newsletter…) only for visitors who accepted advertising cookies. If your consent tool does not send Google Consent Mode v2, tell Lumexio the visitor’s choice yourself: one line of JavaScript, about 10 minutes.

In short

  • Module 1.10.0 or later
  • Accepted → push “granted”
  • Refused → push “denied”
  • Nothing sent → nothing recorded

Which option is for you?

Choose it per shop in the module: Modules › Lumexio › Configure › “Visitor consent”.

Default

Google Consent Mode v2

Your consent tool already sends Google Consent Mode v2 (most do: Axeptio, Didomi, Cookiebot, OneTrust, the PrestaShop “Google Consent Mode” modules…). Nothing to do: Lumexio reads it directly.

This guide

My own consent tool

Your tool does not send Consent Mode v2, you have turned it off, or you built your own banner. Your code tells Lumexio the visitor’s choice through window.lumexioConsent.

Set it up in 3 steps

  1. 1

    Switch the module

    In your PrestaShop back office: Modules › Module Manager › Lumexio › Configure. In “Visitor consent”, choose “My own consent tool”, tick the confirmation box, then Save. Repeat for each shop in a multistore.

  2. 2

    Send the visitor’s choice

    When the visitor accepts advertising cookies, run the “granted” line. When they refuse or withdraw, run the “denied” line. Run it again on every page once the choice is known: most consent tools do this for you through their callbacks (see below).

  3. 3

    Check and place a test order

    Follow the checklist at the bottom of this page. Then place a test order after landing on your shop with ?utm_source=test: its source shows in Lumexio’s Acquisition page after the next sync.

The code

The order of loading does not matter: values pushed before the Lumexio script loads are read as soon as it does. Only the last value counts.

JavaScript
window.lumexioConsent = window.lumexioConsent || [];

// the visitor accepted advertising cookies
window.lumexioConsent.push('granted');

// the visitor refused, or withdrew their consent
window.lumexioConsent.push('denied');

Ready-made code for your consent tool

Pick your tool. Each snippet reads the visitor’s choice and sends it to Lumexio on every page, including when the visitor changes their mind.

In your Axeptio project, add a cookie (vendor) named “lumexio” to your advertising step, then publish. Add this code to every page:

JavaScript
window._axcb = window._axcb || [];
window._axcb.push(function (axeptio) {
  axeptio.on('cookies:complete', function (choices) {
    window.lumexioConsent = window.lumexioConsent || [];
    window.lumexioConsent.push(choices.lumexio ? 'granted' : 'denied');
  });
});

The key (choices.lumexio) must match the vendor name you set in Axeptio.

Where to paste the code on PrestaShop

In your consent tool

Many tools have a “custom script” or “callback” field that runs on every page. It is the simplest place.

In Google Tag Manager

A “Custom HTML” tag fired on all pages. No theme change, no developer needed.

In your theme

Add it to themes/your-theme/assets/js/custom.js (loaded on every page by default themes), then clear the cache in Advanced Parameters › Performance. In a .tpl file, wrap the script in {literal}…{/literal}.

Check it works

Open your shop in a private window, with ?utm_source=test at the end of the address, then open the browser console (F12).

  1. 1 Accept advertising cookies in your banner.
  2. 2 Type window.lumexioConsent in the console: the last value is “granted”.
  3. 3 In Application (Chrome) or Storage (Firefox) › Cookies, a lumexio_attr cookie is present.
  4. 4 Refuse or withdraw your consent: the last value becomes “denied” and the lumexio_attr cookie is deleted.
  5. 5 Nothing happens? Make sure the module is on “My own consent tool” and that its version is 1.10.0 or later.

Good to know

Only after a real consent
Send “granted” only once the visitor has accepted advertising cookies. As the site owner, you remain responsible for collecting that consent: the module stores nothing until it receives it.
What Lumexio stores
A first-party lumexio_attr cookie (30 days) with the visit’s source, medium, campaign, referring site, click ID type and landing page. No visitor identifier, no IP address, nothing shared with ad platforms.
Withdrawal is immediate
“denied” deletes the cookie at once. Orders placed afterwards carry no source.
List it in your cookie policy
Declare lumexio_attr in your consent tool and cookie policy: purpose “measuring the performance of advertising campaigns”, duration 30 days.

Need a hand?

Send us your consent tool’s name and your shop’s address: we will tell you exactly what to paste.

Contact us