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

# Managing cookies and visitor consent

> Base44 tracks visits to your published app by default. To let visitors decline cookies, add a cookie banner and set visitor tracking to wait for their consent.

When people visit your published app, Base44 tracks their visits by default, so you can see how many people come and where they came from in [App Analytics](https://docs.base44.com/documentation/performance-and-seo/app-analytics.md), and watch [session recordings](https://docs.base44.com/documentation/performance-and-seo/session-recordings.md) if you turned them on. To do this, Base44 saves small files called cookies in each visitor's browser as soon as they open your app.

If you want visitors to be able to decline cookies, you need to do 2 things: add a cookie banner to your app, and change the visitor tracking setting so Base44 waits for each visitor's answer. A banner on its own doesn't stop tracking.

![A screenshot of the app editor preview of a travel app with a cookie banner at the bottom offering Decline and Accept](https://mintcdn.com/base44/_R_SYhlNNeW8UQlk/images/app-cookie-banner.png?fit=max\&auto=format\&n=_R_SYhlNNeW8UQlk\&q=85\&s=9f0b327ee071782d44ef3b2ca4f60a48)

A cookie banner built by the AI chat

***

## What Base44 tracks

Visitor tracking covers everything Base44 adds to your published app to follow visits:

* **Visits and page views:** What you see in App Analytics.
* **Custom events:** Actions you chose to track in App Analytics, such as sign-ups or button clicks.
* **Where visitors came from:** A cookie remembers which link or website brought each visitor, for 30 days. Safari may clear it after 7 days.
* **Session recordings:** Only if you turned them on.
* **Ad tracking:** Code that tells an ad platform when someone arrives from your ad, such as the Meta, LinkedIn, TikTok and ChatGPT Ads pixels and Google Ads conversions. Only if you connected an ad account to Base44, for example for [Google Ads campaigns](https://docs.base44.com/promoting-your-app/google-ads-campaigns.md).

Tracking code you add yourself, such as Google Analytics, is separate. Only turning visitor tracking off affects it. Learn more in the [FAQs](#faqs).

***

## How visitor tracking works

Cookies are small files that Base44 saves in a visitor's browser, so it can recognize them as they move around your app and when they come back. The visitor tracking setting decides when Base44 saves them.

> [!WARNING]
>
> Many privacy laws, such as those in the EU, the UK and California, ask apps to get visitors' permission, called consent, before setting cookies that the app doesn't need to work. If you're not sure whether this applies to you, check with a legal advisor. Base44 doesn't decide this for you, so meeting those laws is up to you.

You can choose from 3 options:

### On: tracks every visitor

**On** is the default for every app. Base44 saves its cookies and starts tracking as soon as someone opens your app, without asking. Visitors can't decline, even if your app has a cookie banner. If you don't need to ask your visitors for consent, keep this setting and you don't need to do anything.

### On after visitor consent: waits for the banner

With **On after visitor consent**, Base44 waits until a visitor accepts cookies in your cookie banner before it saves cookies or tracks the visit. Visitors who decline or ignore the banner aren't tracked, so App Analytics, session recordings and ad tracking only include visitors who accept, and your visitor numbers will be lower than before. This option only works with a cookie banner. To set it up, follow Step 1 and Step 2 below.

### Off: doesn't track anyone

With **Off**, Base44 doesn't track your visitors at all. It saves no tracking cookies, App Analytics doesn't count visits, and sessions aren't recorded. Base44 also blocks tracking code you added yourself, such as Google Analytics or the Meta Pixel. To turn it off, see [turning tracking off](#turning-tracking-off).

***

## Step 1 | Add a cookie banner

Ask the AI chat to build a cookie banner for your app. The banner asks visitors to accept or decline cookies, and it tells Base44 what each visitor chose through Google Consent Mode, a standard way for a banner to pass on a visitor's choice. It also adds a **Cookie settings** link, so visitors can change their choice later.

* **Your app already has a banner:** Ask the AI chat to `Make my cookie banner send the visitor's choice through Google Consent Mode.` Then publish your app and go to Step 2.
* **You use your own consent tool:** Turn on its Google Consent Mode option, then go to Step 2.

**To add a cookie banner:**

1. Go to your app editor.

2. Ask the AI chat to add a cookie banner, for example:

   ```text theme={null}
   Add a cookie consent banner to my app with Accept and Decline buttons.
   ```

3. Check the banner in the preview, then publish your app.

***

## Step 2 | Make tracking wait for consent

Set visitor tracking to **On after visitor consent**, so Base44 tracks a visitor only after they accept cookies in your cookie banner. The change applies to your published app right away, so you don't need to publish again.

If your app has no live banner, no visitor can accept, so App Analytics counts no visits at all.

> [!TIP]
>
> **Before you begin:** Publish your app with its cookie banner.

**To make Base44 wait for consent:**

1. Go to your app editor.

2. Click **Dashboard**.

3. Click **Settings** in the left menu.

4. Under **Advanced Capabilities**, find **Visitor tracking**.

   ![A screenshot of the app dashboard Settings page with the Visitor tracking setting outlined under Advanced Capabilities](https://mintcdn.com/base44/qRjqz_bRd3t5-juR/images/visitor-tracking-setting-dashboard.png?fit=max\&auto=format\&n=qRjqz_bRd3t5-juR\&q=85\&s=57cf930374806b1adc560010beb7b8f9)

   The visitor tracking setting in your app's dashboard

5. Click the drop-down and choose **On after visitor consent**.

   ![A screenshot of the Visitor tracking drop-down open with On after visitor consent outlined](https://mintcdn.com/base44/qRjqz_bRd3t5-juR/images/visitor-tracking-settings.png?fit=max\&auto=format\&n=qRjqz_bRd3t5-juR\&q=85\&s=71a074328ca43567df17f5d20e1140ba)

   Choosing On after visitor consent

6. Select the checkbox to confirm you're responsible for cookie consent, then click **Turn on**.

   ![A screenshot of the Turn on visitor tracking after consent dialog with its confirmation checkbox outlined](https://mintcdn.com/base44/qRjqz_bRd3t5-juR/images/visitor-tracking-consent-dialog.png?fit=max\&auto=format\&n=qRjqz_bRd3t5-juR\&q=85\&s=18dcdb652dd71212eba49a6e19acde80)

   Confirming that you're responsible for consent

***

## Turning tracking off

Turn visitor tracking off if you don't want Base44 to track your visitors at all.

**To turn tracking off:**

1. Go to your app editor.
2. Click **Dashboard**.
3. Click **Settings** in the left menu.
4. Under **Advanced Capabilities**, click the **Visitor tracking** drop-down and choose **Off**. It saves right away, with nothing to confirm.

***

## FAQs

Click a question below to learn more.

> [accordion] What happens when a visitor accepts or declines?
>
> With **On after visitor consent**, Base44 counts and records a visit only after the visitor accepts analytics cookies, which cover App Analytics and session recordings. It loads ad tracking from ad accounts you connected only after they accept ad cookies. A banner with just Accept and Decline asks about both at once. If you want visitors to choose separately, ask the AI chat to add those options to your banner.
>
> If a visitor declines, Base44 doesn't track them. Visitors can change their choice at any time with the **Cookie settings** link the AI chat adds to your banner.

> [accordion] Does On after visitor consent cover tracking code I added myself?
>
> No. Only turning visitor tracking off changes tracking code you added, by blocking it. Code such as Google Analytics or the Meta Pixel still loads for every visitor unless you set it up to wait for consent. Ask the AI chat to make it wait for your cookie banner, or use your provider's consent settings. Learn more about [adding tracking scripts](https://docs.base44.com/documentation/performance-and-seo/app-analytics.md#using-third-party-tracking).

> [accordion] How do I go back to tracking everyone?
>
> Follow the steps in Step 2, but choose **On**. Then select the checkbox and click **Turn on**.

> [accordion] I show AdSense ads to visitors in Europe. Is the AI chat's banner enough?
>
> No. To show AdSense ads to visitors in the EEA, the UK and Switzerland, Google requires a consent tool that Google has certified. Use a certified consent tool, turn on its Google Consent Mode option, then follow Step 2.

> [accordion] I built my app a while ago. Do I need to do anything?
>
> Publish your app again after you change the setting. Apps published before this setting existed keep sending App Analytics data until you publish them again.

> [accordion] Why does the setting say Paused?
>
> Base44 has paused visitor tracking for all apps, so no cookies are set and you can't change the setting for now. Your setting applies again once tracking resumes.


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