# Integrations

> Conversion API and cost tracking: where sales are reported and where spend is read from.
> Source: https://www.eventsiq.io/docs/integrations


An integration is what flows between EventsIQ and an ad network. There are two kinds:

-   **Cost tracking** reads what your campaigns spent, so [Reports](https://www.eventsiq.io/docs/reports) can show spend
    next to revenue.
-   **Conversion API** sends events back to a pixel or ad account, so the network learns
    which clicks turned into money.

You'll find them under **Acquire → Integrations**, on two tabs.

:::note{title="Looking for connected accounts, or routing?"}
Connected Meta, TikTok, Google, Snapchat, Microsoft Ads, NewsBreak and AppLovin accounts are now called [Connections](https://www.eventsiq.io/docs/connections).
Branches and waterfalls are under [Routing](https://www.eventsiq.io/docs/routing). Both used to live at this address.
:::

:::tip{title="Where it fits"}
An integration uses a [connection](https://www.eventsiq.io/docs/connections) to reach the network, and a
[traffic source](https://www.eventsiq.io/docs/traffic-sources) to know which network and currency it is about. A
[campaign](https://www.eventsiq.io/docs/campaigns) then picks a Conversion API integration, which is how a postback for one
of its leads knows where to go.
:::

## Which networks are supported

| Network      | Cost tracking | Conversion API |
| ------------ | ------------- | -------------- |
| **Meta**     | Yes           | Yes            |
| **TikTok**   | Yes           | Yes            |
| **Google**   | Yes           | Yes            |
| **Snapchat** | Yes           | Yes            |
| **Microsoft Ads** | Yes      | Yes            |
| **NewsBreak** | Yes          | Yes            |
| **AppLovin**  | Yes          | Yes            |

Picking a traffic source for a network that is not supported says so on the sheet, rather than
saving something that would never run.

## The list

![The Integrations list](https://www.eventsiq.io/docs-media/integrations/01-cost-tracking-list.png "Acquire, Integrations, Cost tracking tab, with a Google, a Meta and a TikTok integration Working and their last run. Names blurred.")

The page has two tabs, **Cost tracking** and **Conversion API**, each with how many you have. The
chips filter by status: **Working**, **Last run failed** or **Off**. Each row shows the integration's
name and network, its status, the account it uses and what it reads or sends to, and, for cost
tracking, how its last run went.

A cost tracking row has **Run now** beside it. Its menu (**⋮**) also has **Import past spend**,
**Edit**, **Rename** and **Duplicate**.

## Fields on both kinds

| Field              | What it does                                                                                            |
| ------------------ | ------------------------------------------------------------------------------------------------------- |
| **Name**           | How it appears in pickers, for example on a campaign                                                    |
| **Traffic source** | The network and its currency                                                                             |
| **Connection**     | The account to use. Only connections for that network are listed. **Connect a new account...** opens the network's sign in in its own window |
| **Notes**          | Anything for whoever reads this next                                                                     |
| **Enabled**        | Turn off to stop it running without deleting it                                                         |

## Cost tracking

Click **New integration** and pick **Cost tracking**.

| Field                | What it does                                                                                       |
| -------------------- | -------------------------------------------------------------------------------------------------- |
| **Ad accounts**      | Which accounts to read. TikTok calls them **Advertiser accounts**. Tick as many as you like       |
| **Run every**        | How often to read spend, from 15 minutes to 24 hours. 60 minutes is the default                   |

Each run reads spend per campaign, per hour. It re-reads the last three days every time, because
networks keep correcting their figures for a few days after the fact.

Spend is counted in each ad account's own currency and time zone. NewsBreak and AppLovin are read
in UTC instead.

:::note{title="Run every is a minimum"}
The schedule checks in on its own rhythm, so a run happens at least that far apart, not exactly on
the minute. A very short interval mostly re-reads figures that are still changing.
:::

### Row actions

| Action                              | What it does                                                                                      |
| ----------------------------------- | ------------------------------------------------------------------------------------------------- |
| **Run now**                         | Reads spend straight away instead of waiting for the schedule                                     |
| **Import past spend**               | Reads spend for a date range you pick, for example when you first connect an account              |
| **Remove spend it no longer reads** | Clears spend from ad accounts you have unticked, so it stops counting in Reports                  |

## Conversion API

Click **New integration** and pick **Conversion API**. After the fields above, pick where events go:

| Network    | Fields                                                                                                       |
| ---------- | ------------------------------------------------------------------------------------------------------------ |
| **Meta**   | **Business account** (optional, narrows the list), then the **Pixel**                                         |
| **TikTok** | **Advertiser account** (optional), the **Pixel**, and a **Pixel access token** only if TikTok refuses without one |
| **Snapchat** | **Ad account**, then the **Pixel**. It lists your Snap Pixels. A Snap App ID does not work                 |
| **Google** | The **Google Ads account**                                                                                     |
| **Microsoft Ads** | The **Microsoft Ads account**. Each postback event then picks one of its offline conversion goals |
| **NewsBreak** | The **NewsBreak ad account**. Each postback event then picks one of its Postback events |
| **AppLovin** | The connection's **pixel**. The one postback event that means a sale is sent as `generate_lead`. See [AppLovin](https://www.eventsiq.io/docs/applovin) |

**Currency** is what sale values are reported in. Leave it empty to use the traffic source's
currency. Snapchat only takes some currencies, such as USD, EUR and GBP. The sheet will not save a
currency Snapchat refuses, and warns you when the traffic source's currency is one it refuses.

![A Conversion API integration](https://www.eventsiq.io/docs-media/integrations/02-conversion-api.png "The Conversion API sheet for Meta with a pixel chosen and three Postback events rows.")

### Postback events

This is the important part. Each row says: when my CRM reports **this** event, send the network
**that** event.

1. Click **Add**.
2. On the left, pick one of your [postback events](https://www.eventsiq.io/docs/postbacks), for example `sold`.
3. On the right, type the name the network should receive, for example `Purchase` for Meta. For
   Google you pick one of your **Import from clicks** conversion actions instead. For Snapchat you
   pick from Snapchat's own list, for example `PURCHASE` or `SIGN_UP`, because Snapchat refuses any
   other name. For Microsoft Ads you pick one of the ad account's **offline conversion goals**. See
   [Microsoft Ads](https://www.eventsiq.io/docs/microsoft-ads). For NewsBreak you pick one of the ad account's **Postback
   events**. See [NewsBreak](https://www.eventsiq.io/docs/newsbreak). For AppLovin you map only the one postback event that
   means a sale, and it is sent as `generate_lead`. See [AppLovin](https://www.eventsiq.io/docs/applovin).
4. Meta only: turn on **CRM** to send it as a CRM event instead of a conversion. **Edit CRM details**
   then lets you set `lead_event_source`, `event_source` and `lead_status`.

EventsIQ warns you on a row when the postback event is turned off, when `Purchase` (or Snapchat's
`PURCHASE`) is sent with no value, or when the name is not one of the network's standard events. The
last step repeats the `Purchase` warning, because the network refuses that event without a value.

:::warning{title="No rows means nothing is sent"}
An integration with no Postback events rows sends nothing, whatever your CRM reports. The sheet says
**None mapped, so postbacks send nothing to this pixel.**
:::

### What gets sent

**Built from the lead** lists what EventsIQ fills in for you: hashed email, phone, name and location,
the network's own click ids (`fbc` and `fbp` for Meta, `ttclid` for TikTok, `ScCid` for Snapchat,
`gclid` for Google, `msclkid` for Microsoft Ads, `newsbreak_cid` for NewsBreak, `aleid` for AppLovin), the
IP address and browser where the network allows them, the sale value, and the event time. You do not
configure these.

**Your own fields** adds extras to the event's custom data. Give each a name and a token, for example
`lead_score` and `{{data.score}}`.

:::note{title="Google: one event, both ways of matching"}
For Google, each conversion carries the click id and the hashed contact details together, and Google
matches on whichever it can. The visitor's IP is only sent for website form leads, and never for
people in the EEA, the UK or Switzerland.
:::

## Deleting

Deleting a cost tracking integration stops future reads. Spend already read stays in Reports until
you remove it. Deleting a Conversion API integration leaves any campaign that picked it with nothing
to send postbacks to, so pick another on those campaigns.

## Related

-   [Postbacks](https://www.eventsiq.io/docs/postbacks): the events your CRM reports, and how they reach these integrations.
-   [Campaigns](https://www.eventsiq.io/docs/campaigns): where a Conversion API integration is chosen.
-   [Reports](https://www.eventsiq.io/docs/reports): where cost tracking's spend appears.
