> For the complete documentation index, see [llms.txt](https://docs.pos.pages.fm/pos/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pos.pages.fm/pos/english/advanced-features/optimize-purchase-event-conversions-with-facebook-capi-2024/optimize-purchase-conversions-with-capi-for-facebook-+-instagram.md).

# Optimize purchase conversions with CAPI for Facebook + Instagram

Previously, with the Event API, you could only fire a purchase event from Pancake POS to Ads Manager with a Facebook Page. However, with CAPI, you can apply it to Instagram as well.

{% hint style="info" %}
If you read the documentary and are still confused, what should you do to install CAPI? The answer is **To-do-Nothing.**

Pancake and Meta have AUTOMATICALLY moved all customers to CAPI, so unless there is a special purpose (setting up CAPI for IG, controlling data sets on Event Manager,...) you don't need to do anything else.&#x20;
{% endhint %}

{% hint style="info" %}
**Note:**

* Each Facebook and IG page will only be able to connect to 1 dataset. This means you cannot connect 2 Facebook pages into 1 dataset. However, you can connect 01 Facebook page + 01 IG page into the same dataset.
* Each dataset can contain events of 01 Facebook + 01 IG, however for ease of statistics, you should create a separate dataset for each page.
* The connecting person must have ADMIN rights on that Business Manger, and have the right to manage the Facebook Pages and IGs that need to be connected.
* These Facebook and IG pages are located in a shop on Pancake POS.
* During the CAPI installation process, you need to choose the CORRECT FB and IG pages available in your shop.
* If your shop has many PAGES and IGs, during the installation process below, you can create a series of datasets.
* IG and linked Facebook Page need to be managed in 01 Business Manager. ([How to create a Business Manager](https://www.facebook.com/business/help/1710077379203657?id=180505742745347))
  {% endhint %}

## Step 1: Access CAPI setting

1. Access your shop on Pancake POS.
2. Access Configuration > Shop information

<figure><img src="https://4075213368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F31rlQ63TnBzq1lNIyA7i%2Fuploads%2FcYIakz2SAZDcBdou8lH7%2FScreenshot%202024-06-13%20at%2015.19.46.png?alt=media&amp;token=5e873fc7-5442-411b-9092-32942a5d4a66" alt=""><figcaption></figcaption></figure>

## Step 2: Connect Meta CAPI

<figure><img src="https://4075213368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F31rlQ63TnBzq1lNIyA7i%2Fuploads%2FYrZWLaknApsIgLabU9Ri%2FScreenshot%202024-06-13%20at%2015.21.53.png?alt=media&amp;token=67bb2e13-0889-4b7f-a91f-91fb5224d92b" alt=""><figcaption></figcaption></figure>

* Select "Connect Meta CAPI"&#x20;
* Select the Business Manager containing your Page and IG then click **Continue.**

<figure><img src="https://4075213368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F31rlQ63TnBzq1lNIyA7i%2Fuploads%2FL9BdhCgEGLpfBlyoKrPu%2FScreenshot%202024-06-13%20at%2015.23.53.png?alt=media&amp;token=8ed64140-5b8a-46f6-806a-aeb0eae3ee4a" alt=""><figcaption></figcaption></figure>

* Select the Facebook Page you want to use CAPI.

{% hint style="info" %}
In this step, if the Shop is merging multiple pages, you can tick multiple pages to connect in bulk.
{% endhint %}

<figure><img src="https://4075213368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F31rlQ63TnBzq1lNIyA7i%2Fuploads%2F9Cx1HlXr4f5oiclEspcr%2FScreenshot%202024-06-13%20at%2015.27.13.png?alt=media&amp;token=62337196-57da-476a-aba0-cb3697c562d8" alt=""><figcaption></figcaption></figure>

* Select the IG you want to use CAPI for.

{% hint style="info" %}
If you don't have an IG account, or don't want to create a dataset for IG, you can skip this step.
{% endhint %}

<figure><img src="https://4075213368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F31rlQ63TnBzq1lNIyA7i%2Fuploads%2FpreIUMJ1DVryQo0ST1vO%2FScreenshot%202024-06-13%20at%2015.29.03.png?alt=media&amp;token=16c0d29c-1ddc-4144-94f8-4c763f1b9ac0" alt=""><figcaption></figcaption></figure>

* Create or connect with available dataset

<figure><img src="https://4075213368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F31rlQ63TnBzq1lNIyA7i%2Fuploads%2FTcwni9RXLFQjv5RpJREM%2FScreenshot%202024-06-13%20at%2015.35.46.png?alt=media&amp;token=45fbb942-a603-4022-ab0d-732f86f2ca31" alt=""><figcaption></figcaption></figure>

* Allow permisisons for Pancake to push event

<figure><img src="https://4075213368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F31rlQ63TnBzq1lNIyA7i%2Fuploads%2FrygG5WlfxRK2FhfWCe0H%2FScreenshot%202024-06-13%20at%2015.37.29.png?alt=media&amp;token=a56e51a2-60c7-426d-b6c9-085c9d29531a" alt=""><figcaption></figcaption></figure>

After that, the setup steps have been completed. When you create an order for a customer on Pancake, by default, if the order changes to **Confirmed** status, the data will be transmitted through **CAPI** to the **Data File (Dataset)** and connected to **Ads Manager** for statistics and optimization advertisement.

<figure><img src="https://4075213368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F31rlQ63TnBzq1lNIyA7i%2Fuploads%2FOVLxD6j2TO4NT5wO8wlM%2FScreenshot%202024-06-13%20at%2015.44.40.png?alt=media&amp;token=969d739e-0b44-4bcd-a3d3-afee5526717e" alt=""><figcaption></figcaption></figure>

## 3. Setup customize event (Optional)

By default, when you turn on "Notice of Facebook Events":

* If the order is in New status => POS will hear the Initiated Checkout event (\~Add to cart)
* If the order changes to the Confirmed state, or jumps from New to the following states Confirmed (for example, waiting for goods, waiting for delivery,...) => POS will fire the Purchase event.

<figure><img src="https://4075213368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F31rlQ63TnBzq1lNIyA7i%2Fuploads%2F8mOoT6uJThozPInFFuE9%2FScreenshot%202024-06-13%20at%2015.47.25.png?alt=media&amp;token=4ec1bb19-96a7-4c2b-b11c-fefb52fcbc57" alt=""><figcaption></figcaption></figure>

Hope your sales will increase 3x after optimize CAPI!
