> ## Documentation Index
> Fetch the complete documentation index at: https://help.maestra.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Site Personalization Before Cookie Consent

Until a visitor answers your cookie banner, Maestra Platform can still show them pop-ups, embedded forms, and non-personalized recommendations — it just doesn't identify or track them. Content is displayed, but no cookies are set, no [DeviceUUID](https://help.maestra.io/api-integrations/what-is-a-deviceuuid.md) is assigned, and no page views are recorded.

Here's what visitors see before they consent, what waits for consent, and how to set up campaigns so the important ones reach everyone.

## Who this applies to

Content before consent is shown only in **buffer** mode (the default). For more on consent modes, see [Consent Modes and Cookie Banner Setup](https://help.maestra.io/api-integrations/consent-and-tracking.md).

| Situation | What the visitor sees before answering the banner |
| - | - |
| Buffer mode (in the Shopify app — **Buffer until consent**) | See [What's shown before consent and what isn't](#what’s-shown-before-consent-and-what-isn’t) |
| Gate mode (**Don't load before consent**) | Nothing. The script doesn't load until the visitor consents |
| A region where the banner isn't shown (for example, the US) | Full tracking from the first page |
| A site without a `consent` block in `create` | Full tracking — the tracker assumes consent is given |

> [!NOTE]
>
> Full consent means the visitor allowed **both** analytics and marketing. A visitor who allowed only one of the two sees the same thing as a visitor who hasn't consented.

## What's shown before consent and what isn't

> [!WARNING]
>
> This section doesn't apply to gate mode. In gate mode, visitors don't see any personalization until they consent.

There's one rule: **a campaign shows before consent if everything it needs is on the current page**. If it needs the visitor's history, their profile, or data stored in the browser, it waits for consent.

| Campaign setting | Before consent |
| - | - |
| Page: URL, page type, the product or category on the page, an element on the page | Shown |
| UTM parameters and referrer of the current page | Shown |
| Time, day of the week, device type | Shown |
| Triggers: delay, scroll, exit intent, inactivity | Shown |
| Frequency cap | Works within a single browser tab. Close the tab and the counter resets |
| Cart: has products, cart total, specific products | Waits for consent |
| Number of visits, pages visited, time on site, pages per session | Waits for consent |
| Form shown / submitted / not submitted | Waits for consent |
| Customer segment, product segment | Waits for consent |
| Location by IP | Waits for consent — unless your site passes the location on the page itself |
| JavaScript condition | Waits for consent: Maestra Platform can't tell what data it reads |
| A/B test, control group, participation in a global A/B test | Waits for consent (see [A/B tests](#a/b-tests) below) |
| A form that updates an existing customer's data (edit mode) | Waits for consent |
| A lead generation form or a quiz that asks for contact details, if your site has bot protection enabled | Waits for consent |

> [!TIP]
>
> If a condition that waits for consent is joined to the rest with **AND**, the whole campaign waits for consent. For example: "visited yourbrandpromo.com" (shown before consent) AND "customer segment: VIP" (waits for consent).
>
> If it's joined with **OR**, the campaign can still show through the condition that doesn't need consent. For example: "visited yourbrandpromo.com" (shown before consent) OR "customer segment: VIP" (waits for consent) — the campaign can show through the "visited yourbrandpromo.com" branch.

Conditions that wait for consent are checked the moment the visitor clicks **Accept** — no page reload needed.

Here's how a delay works before and after consent:

* **"Product X page" + 30-second delay** — no consent needed. The pop-up shows 30 seconds after the page opens.
* **"Previously viewed product X" + 30-second delay** — the 30 seconds count from when the page opened, and the browsing history is checked when the visitor clicks **Accept**. If 30 seconds have already passed by then, the pop-up shows right after **Accept**.

## Cart and progress bars

The same rule applies to the cart: **a campaign shows before consent if everything it needs is on the current page**.

* **"\$X left until free shipping" text in a pop-up or block**

  **On Shopify**, it works before consent. The total comes from the store's cart right on the page, and nothing is stored or sent. For example, with \$15 in the cart and a \$99 threshold, the bar reads "\$84 more to unlock Free Shipping."

  **On other sites**, it waits for Accept. The total comes from the data your site passes to the tracker, and the tracker doesn't hand it over before consent. If the visitor declines, the pop-up or block doesn't show.

* **Cart targeting conditions** ("cart has products," "cart total ≥ X," "cart contains product Y") wait for consent on every site, including Shopify. They use Maestra Platform's own cart data, which exists only for visitors who've consented.

* **Templates with a list of cart products**

  Before consent, they're shown with an empty cart on every site, including Shopify. To avoid an empty block, add the "cart has products" condition to the campaign. It waits for consent, so the pop-up won't show before **Accept** — and after **Accept**, it shows with the products.

  The exception is sites that put the cart on the page themselves in `window.PopMechanicCartData`. If the template reads the cart from there, the list is filled before consent too.

> [!TIP]
>
> **Shopify only:** to show the "\$X left until free shipping" text to everyone, swap the cart condition for a page condition: the cart URL, a product page, or a category page. The amount inside will still show the real cart total. This won't work for a list of cart products: it only appears after consent (see **Templates with a list of cart products** above).

## Lead generation forms and recommendations

**Lead generation forms** — embedded, pop-up, and quizzes — are shown and can be submitted before consent.

* A customer profile is created from the email or phone number. It holds only what the visitor entered and the subscription consent they gave in the form.
* Location by IP and the DeviceUUID aren't passed, even if they're set up in the form settings.
* The new profile isn't linked to this visitor's browsing history.
* Two kinds of forms wait for consent: forms that update an existing customer (edit mode), and every lead generation form if your site has bot protection enabled.

**Recommendations.** Before consent, presets that don't need the visitor's history work.

| Preset | Before consent |
| - | - |
| Bestsellers Recommendation Preset, Category Bestsellers Recommendation Preset | Work |
| Similar Products Recommendation Preset, Related Products Recommendation Preset, Custom Recommendation Preset (based on the product on the page) | Work |
| Personal Recommendation Preset | Shows bestsellers |
| Recently Browsed Products, Bestsellers from Previously Viewed Categories, presets based on the last order, presets based on products in the Cart or Favorites | Don't work |

If a widget has a fallback preset from the top rows of the table (bestsellers, for example), the widget shows with that preset. If every preset in the widget depends on history, the widget doesn't show before consent.

## A/B tests

Site personalization campaigns with an A/B test or a control group wait for consent. To show a visitor the same variant every time, Maestra Platform has to remember them — and that takes a DeviceUUID, which isn't assigned until the visitor clicks **Accept**.

* This covers A/B tests inside a campaign, control groups, and campaigns included in a global A/B test.
* Test results stay accurate, but they describe only visitors who consented. In regions with a consent banner, not every visitor accepts, so fewer visitors take part in the test and it may need more time.
* Exception: campaigns that run on your site but aren't named in any variant of the global A/B test. Before consent, Maestra Platform doesn't know which variant the visitor will land in. So campaigns named in variants wait for **Accept**, while unnamed campaigns show to everyone before consent — even to visitors who won't see them after **Accept**. This happens in two cases:
  * **The test has a variant with all campaigns selected.** For example, variant A has all campaigns, and variant B has only X and Y. Campaign Z isn't named in either variant. After **Accept**, visitors in variant B don't see it, but before **Accept**, everyone does.
  * **The test has a control group.** After **Accept**, visitors in the control group don't see any campaigns, but before **Accept**, they see every unnamed one.

> [!TIP]
>
> **If a campaign has to reach everyone** (your main email capture pop-up, for example), launch it without an A/B test or a control group. If a global A/B test is running on your site, tick **Display form for all global A/B test participants on the website** in the campaign's general settings, and don't add the campaign to any test variant. Campaigns with this box ticked don't take part in the global A/B test: every visitor sees them in every variant, including before consent.

## Reports and attribution

Contacts submitted through a form by visitors who haven't consented (the **Leads** metric) are counted in the report, but their impressions and clicks aren't. Visitors who've consented are counted in full.

Here's how that shows up in **Reports → Website personalization** (the **Revenue** and **Lead generation** tabs):

| Metric | Counts visitors without consent? | What it means |
| - | - | - |
| **Targeted visitors**, **Impressions rate** (views) — both tabs | No | Your real reach is bigger than the report shows |
| **CTR** — Revenue tab | No | Clicks from visitors without consent aren't visible |
| **Total revenue**, **Average order value**, **Conversion to order** — Revenue tab | No | Revenue is tied to a click from the same device |
| **Leads** — Lead generation tab | Yes | Every submitted contact is counted |
| **Lead conversion rate** — Lead generation tab | Leads — yes, views — no | The conversion rate looks higher than it really is |

> [!WARNING]
>
> "Without consent" and "anonymous" aren't the same thing. A visitor who consented but hasn't shared contact details yet is counted in full: their impressions, clicks, and targeting matches are all recorded.

A few more things to know:

* **Orders reach the customer profile** through your store integration. It runs on Maestra Platform's servers and doesn't depend on cookies on your site.
* **Email and SMS revenue** is attributed as usual, by message.
* **Flows based on site behavior** (product view, abandoned cart on the site) don't fire for visitors who never consent.
* **The A/B test report** is built only from visitors who consented.

## After consent and after decline

**If the visitor consents**, tracking turns on right on the same page, without a reload:

* Pop-ups and widgets already on screen stay put and don't show again.
* Campaigns on hold (with history-based conditions or A/B tests) start being checked.
* The page the visitor landed on (UTM parameters, referrer) is sent to Maestra Platform, so the visit source isn't lost.
* Whatever was shown before consent isn't added to the report retroactively.

**If the visitor declines**, they keep seeing the available content for customers without consent, and everything Maestra Platform kept in their browser is deleted.

> [!TIP]
>
> Before consent, Maestra Platform stores data only in sessionStorage — no cookies, no identifiers. It's all deleted when the tab closes.

| Record | Contents |
| - | - |
| `maestraLanding` | Landing page, referrer, and arrival time (buffer mode) |
| `popmechanic.last-shown-<campaign ID>` | When the campaign was last shown — used for the frequency cap |

## How to prepare campaigns and check them on your site

To make sure an important campaign shows to every visitor:

* Target only by page, time, device, and triggers (delay, scroll, exit intent).
* Don't use an A/B test or a control group.
* Don't use a JavaScript condition. In particular, remove any homemade consent checks (through `customerPrivacy`, for example): Maestra Platform checks consent itself.
* Make sure the lead generation form creates a customer rather than editing an existing one.
* Give the recommendation widget a fallback preset that doesn't need history (bestsellers or similar products).

**How to check it on your site**

**1. Open your site without answering the banner**

Open your site in a private window from a region where the cookie banner shows (or through a VPN). Don't answer the banner.

**2. Check that the content shows**

Make sure the pop-up, block, or widget you need appears.

**3. Check cookies and session storage**

In developer tools, open **Application → Cookies**: there shouldn't be a `maestraDeviceUUID` cookie. **Session Storage** should hold only `maestraLanding` and `popmechanic.last-shown-…`.

**4. Click Accept**

`maestraDeviceUUID` and `maestraConsent` appear, and campaigns that were waiting for consent start being checked.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.