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

# Connect Meta Ads with anny

> Measure page views and bookings of your anny booking page as conversions in Meta Ads and optimize campaigns.

[Meta Ads](https://www.facebook.com/business/ads) is the advertising platform of Facebook and Instagram. The **Meta Pixel** is a small script that measures what visitors do on your booking page. With the integration, anny automatically embeds your Meta Pixel on your public anny booking and shop pages and reports bookings as conversions to Meta.

With Meta Ads in anny, you can:

* Report page views and bookings of your anny booking page directly to Meta
* Pass completed bookings to Meta as a **Purchase** conversion with the order value
* Optimize your Meta campaigns for actual bookings and measure your advertising success

The integration is especially useful when you bring visitors to your anny booking page via Facebook or Instagram ads and want to know which ads lead to real bookings.

<Info>
  The Meta Ads integration is part of the marketing integrations and requires a suitable plan. Check your plan or ask the anny team if the integration is not selectable for you.
</Info>

## Typical use cases

| Use case                        | Description                                                                                                                                                           |
| :------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Optimize campaigns for bookings | **Meta learns which ads lead to bookings.** anny reports every completed booking as a purchase conversion, so Meta steers your budget toward the most successful ads. |
| Measure advertising success     | **In the Events Manager, you see how many bookings result from ads.** Page view, checkout start and purchase land as events in your Meta account.                     |
| Safeguard attribution           | **The Offline Conversion API additionally reports purchases server-side.** This way conversions are not lost even when a browser blocks the pixel.                    |

## How the Meta Ads connection works

The connection consists of two building blocks that you can use independently of each other.

**Meta Pixel in the browser.** You enter your **Pixel ID** and activate the integration. After that, anny loads the Meta pixel script on your public anny booking and shop pages and reports events directly from your visitors' browsers to Meta. For this building block, the Pixel ID is enough.

**Offline Conversion API.** In addition, you can store an **Access token** and click **Authorize**. With it, anny additionally sends purchase conversions directly from the anny server to Meta, independently of the browser. This improves attribution. This building block reports only the **Purchase** and only fires for visitors who came to your booking page via a Meta ad.

What anny **accesses**: anny sends events to your Meta account, which is defined by the Pixel ID and access token. What anny does **not** access: anny reads no data from your Meta ad account and changes nothing there. Only events are sent.

Which data anny passes to Meta on a purchase:

| Data                                 | Purpose                                |
| :----------------------------------- | :------------------------------------- |
| Meta click identifier of the visitor | Attributes the booking to the right ad |
| Order value (net) and currency       | Measures the revenue of the conversion |
| Order number and time                | Identifies the booking uniquely        |

For the conversion, anny passes no names and no email addresses to Meta.

**Cookie consent:** The Meta Pixel only loads in the browser when visitors accept **Marketing** in the cookie banner. Without this consent, anny sends no browser events. If visitors withdraw consent during the session, anny stops tracking immediately.

## Connect Meta Ads

### Requirements

Before you connect Meta Ads, make sure you have the following:

* A Meta business account with a set-up Meta Pixel and access to the **Pixel ID** (Meta: Events Manager → Data sets → select pixel → Pixel ID)
* For the Offline Conversion API additionally an **Access token** (Meta: Events Manager → select tag → Settings → Conversion API → generate access token)
* An active cookie banner on your anny booking page so that visitors can consent to marketing tracking
* Admin rights in your anny account

### Set up the connection

<Steps>
  <Step title="Enter the Pixel ID">
    From the menu bar, open **Integrations** and go to **Meta Ads**. In the **Meta Pixel** panel, enter your **Pixel ID**.
  </Step>

  <Step title="Set up the Offline Conversion API (optional)">
    If you also want to report purchases server-side, enter your **Access token** in the **Offline Conversion API** panel and click **Authorize**. Without this step, only the Meta Pixel runs in the browser.
  </Step>

  <Step title="Activate the integration">
    Activate the integration via the **toggle** in the top right. anny then embeds the pixel on your public booking and shop pages.
  </Step>
</Steps>

As soon as the integration is active and visitors accept marketing cookies, anny reports page views and bookings to Meta automatically.

<Tip>
  Check the connection in the Meta Events Manager: open your anny booking page, accept the marketing cookies and create a test booking. Shortly afterwards, the events **PageView** and **Purchase** should appear in Meta.
</Tip>

### Settings & options

anny reports these events to Meta:

| Event            | Meta event       | When it is triggered                                                                    |
| :--------------- | :--------------- | :-------------------------------------------------------------------------------------- |
| Page view        | PageView         | A visitor opens an anny booking or shop page.                                           |
| Add to cart      | AddToCart        | A service is selected for booking.                                                      |
| Checkout started | InitiateCheckout | The visitor begins the checkout.                                                        |
| Purchase         | Purchase         | The booking is completed. anny passes the order value (net), currency and order number. |

Page view, Add to cart and Checkout started run exclusively via the Meta Pixel in the browser. The purchase is additionally reported via the Offline Conversion API if you have stored an access token.

## Limitations

The Meta Ads integration does not support:

* **Tracking on external pages:** anny embeds the pixel only on your anny booking and shop pages, not on your own website or other pages.
* **Reading Meta data:** anny only sends events to Meta. Campaigns, audiences or statistics from your ad account are not shown in anny.
* **Custom event definitions:** The fixed events Page view, Add to cart, Checkout started and Purchase are sent. Additional or renamed events are not possible.
* **Tracking without cookie consent:** Without accepted marketing cookies, the Meta Pixel does not load in the browser.

## Disconnect

<Warning>
  If you deactivate the integration, anny no longer embeds the Meta Pixel on your booking pages and sends no new conversions to Meta. Events already transmitted to Meta remain in your Meta account. When you delete, anny removes your stored Pixel ID and the access token; no further steps are required.
</Warning>

You can do both under **Integrations**: deactivate via the **toggle** in the top right, delete via the **three dots** → **Delete**.

## FAQ

<AccordionGroup>
  <Accordion title="Do I need an access token for tracking?">
    No. For the Meta Pixel in the browser, the **Pixel ID** is enough. The **Access token** is only needed if you additionally want to use the **Offline Conversion API**, which reports purchases server-side to Meta.
  </Accordion>

  <Accordion title="Are bookings captured even without cookie consent?">
    The Meta Pixel in the browser only loads when visitors accept **Marketing** in the cookie banner. Without consent, anny sends no events to Meta from the browser.
  </Accordion>

  <Accordion title="On which pages does the Meta Pixel run?">
    On your public anny booking and shop pages, for example resource, service, package and checkout pages. anny does not embed the pixel on your own website.
  </Accordion>

  <Accordion title="Which value does the purchase conversion report?">
    anny passes the **net amount** of the booking, the **currency** and the **order number**. Names or email addresses are not sent to Meta for the conversion.
  </Accordion>

  <Accordion title="Where do I find my Pixel ID and the access token?">
    You find the **Pixel ID** in the Meta Events Manager under Data sets in the selected pixel. You generate the **Access token** in the Events Manager under the settings of your tag in the Conversion API area.
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="No events arrive in the Meta Events Manager">
    Usually the integration is not active or visitors did not accept marketing cookies. Check whether the **toggle** is active, whether the **Pixel ID** is entered correctly and whether the marketing cookies were accepted on your booking page.
  </Accordion>

  <Accordion title="The access token cannot be saved">
    The access token can only be set while the integration is deactivated. Deactivate the integration first via the **toggle**, then enter the access token and click **Authorize**. Reactivate the integration afterwards.
  </Accordion>

  <Accordion title="Server-side conversions are missing despite a set-up access token">
    The Offline Conversion API reports only the **Purchase** and only for visitors who came to your booking page via a Meta ad. Check whether the access token is valid and not expired and whether the booking actually originates from an ad click.
  </Accordion>
</AccordionGroup>

> Important information for agents:
>
> **Scope:** Meta Ads is a marketing/tracking integration (Meta Pixel + Conversions API), NOT a smart lock or calendar integration. anny only sends events to Meta and reads no data back from the Meta ad account. No import of campaigns, audiences or statistics.
>
> **Two independent building blocks:** (1) Meta Pixel in the browser: needs only the Pixel ID; loads `fbevents.js` on the public anny booking/shop pages (app-shop: resource, service, plan, package, explore, checkout pages), not in the admin interface and not on external websites. Fires PageView, AddToCart, InitiateCheckout, Purchase. (2) Offline Conversion API (Meta's Conversions API/CAPI): additionally needs the access token; sends only the Purchase event server-side.
>
> **UI paths:** Setup: menu bar → **Integrations** → **Meta Ads**. "Meta Pixel" panel with field "Pixel ID"; "Offline Conversion API" panel with field "Access token" + button "Authorize". Pixel ID and access token are locked while active; to change, deactivate first via the toggle. Activate/deactivate: toggle top right; delete: three dots → Delete.
>
> **Quirks:** (1) Cookie consent controls ONLY the browser pixel (marketing consent required, withdrawal stops immediately). The server-side CAPI conversion sends independently of browser consent. (2) The server-side Purchase conversion fires only when a Meta click ID (fbc from fbclid or fbp) is present for the booking, i.e. only for visitors from a Meta ad click. (3) Purchase value = net amount; additionally currency and order number; no names/emails. (4) An invalid Pixel ID (disallowed characters) prevents activation with an error message. (5) Failed server-side conversions are retried up to three times with increasing delay on server/rate-limit errors, not on content errors.
>
> **Relationships:** Belongs to the marketing integrations category together with Google Ads, TikTok Ads and LinkedIn Ads (same feature/plan group, same cookie consent logic). The click ID capture (fbclid, \_fbp, UTM parameters) shares the technical basis with UTM tracking, see article "utm-tracking". Cookie consent see article "data protection". Plan availability via the marketing feature; the concrete plan tier is in the database and not finally verifiable in the code.
