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

# Facebook

> Adding Facebook's Cost Tracking Integration

Thanks to ClickFlare's API integration with Facebook, you'll be able to track the cost of your campaigns, ads, and Ad Sets directly from ClickFlare, making tracking and optimization easier than ever before.

In this article, we'll go over the step-by-step process of setting up the API Cost Integration with Facebook.

**What you'll need for the integration:**

* An active ClickFlare Account
* An active Facebook Ads Account
* Facebook Login Credentials

Begin the process by:

1. Click the Left **Sidebar**
2. Move to the **Integrations** Menu on the left side of the screen.
3. In the **Cost Integrations** section, click on **Add Integration**.

   <img src="https://mintcdn.com/clickflare/CYud8uFyD2eqmFKu/images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-01.png?fit=max&auto=format&n=CYud8uFyD2eqmFKu&q=85&s=49ddf81784da0acd9b50802110463b47" alt="In the Cost Integrations section, click on Add Integration" width="1905" height="638" data-path="images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-01.png" />
4. Select **Facebook** from the options.

   <img src="https://mintcdn.com/clickflare/CYud8uFyD2eqmFKu/images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-02.png?fit=max&auto=format&n=CYud8uFyD2eqmFKu&q=85&s=c5e906b53def42cf0df17ec758b62426" alt="Select Facebook from the options" width="1894" height="827" data-path="images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-02.png" />
5. From the dropdown menu, select the **Facebook Ads** account you want to connect.

   <img src="https://mintcdn.com/clickflare/CYud8uFyD2eqmFKu/images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-03.png?fit=max&auto=format&n=CYud8uFyD2eqmFKu&q=85&s=ef3666def7f53cd3ea398e4e5d44f956" alt="From the dropdown menu, select the Facebook Ads account you want to connect" width="805" height="237" data-path="images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-03.png" />

   **A.** If you already have a Facebook account connected to ClickFlare, you should be able to see them in the dropdown(image below).

   <img src="https://mintcdn.com/clickflare/CYud8uFyD2eqmFKu/images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-04.png?fit=max&auto=format&n=CYud8uFyD2eqmFKu&q=85&s=85c8a08c17287184a1e7fc283e479c5f" alt="A. If you already have a Facebook account connected to ClickFlare, you should be able to see them in the dropdown(image…" width="784" height="372" data-path="images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-04.png" />

   **B.** If not, then click on the "**Sign in with Facebook**" button. You’ll be redirected to the Facebook page. Permit ClickFlare to access your account by clicking on **Continue as \&lt;Your account name>**.

   <img src="https://mintcdn.com/clickflare/CYud8uFyD2eqmFKu/images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-05.png?fit=max&auto=format&n=CYud8uFyD2eqmFKu&q=85&s=9a83cb5e731fbc4595d6df3a5c979e0d" alt="B. If not, then click on the &#x22;Sign in with Facebook&#x22; button. You’ll be redirected to the Facebook page. Permit…" width="558" height="552" data-path="images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-05.png" />

   After being redirected to ClickFlare’s Integration window, select the newly connected account from the dropdown menu.

   <img src="https://mintcdn.com/clickflare/CYud8uFyD2eqmFKu/images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-06.png?fit=max&auto=format&n=CYud8uFyD2eqmFKu&q=85&s=5297e0d152060d5d4464c29113328043" alt="After being redirected to ClickFlare’s Integration window, select the newly connected account from the dropdown menu" width="813" height="368" data-path="images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-06.png" />
6. Choose the **Ad Account(s)** from which you want costs to be pulled, then click **Save**.

   <img src="https://mintcdn.com/clickflare/CYud8uFyD2eqmFKu/images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-07.png?fit=max&auto=format&n=CYud8uFyD2eqmFKu&q=85&s=bfe8407c26b499647101a9113107d3a0" alt="Choose the Ad Account(s) from which you want costs to be pulled, then click Save" width="816" height="475" data-path="images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-07.png" />

   <Info>
     Note: You only need to create one integration per Business Account. In one integration, you can select multiple ad accounts. ClickFlare will then automatically know to which campaigns to associate costs.
   </Info>
7. Optional Step - Specify the traffic source configurations you want to assign this cost integration to.

   <img src="https://mintcdn.com/clickflare/CYud8uFyD2eqmFKu/images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-08.png?fit=max&auto=format&n=CYud8uFyD2eqmFKu&q=85&s=9b0b936ae14566c2d8090bf23087ee4b" alt="Optional Step - Specify the traffic source configurations you want to assign this cost integration to" width="786" height="228" data-path="images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-08.png" />

   If in this step you do not set which traffic source configurations will use this cost integration, you can alternatively set the cost integration on the traffic source configuration settings.

   <Info>
     **Important note:** Make sure that the traffic source configurations you select in this step belong to the traffic source you created the integration for.
   </Info>

   Once done, click on **Save**.
8. Lastly, go to the traffic source configuration settings and add the previously created cost integration under the cost integration settings.

   <img src="https://mintcdn.com/clickflare/CYud8uFyD2eqmFKu/images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-09.png?fit=max&auto=format&n=CYud8uFyD2eqmFKu&q=85&s=73a2929ed19746074200a878b1a5f6a9" alt="Lastly, go to the traffic source configuration settings and add the previously created cost integration under the cost…" width="1905" height="813" data-path="images/help-center/05-integrations/02-cost-tracking-integrations/02-facebook-09.png" />

   <Info>
     **Important Note:** When adding a [Traffic Source](/docs/en/tracking/creating-a-traffic-source), remember to select the new integration you just added. Failing to do so will result in costs not being pulled.
   </Info>

Congratulations, you’ve just finalized the cost integration of **Facebook** in **ClickFlare**. From now on, you’ll be able to see the cost of your campaigns directly from ClickFlare.
