# Facebook

advanced expert team enterprise

# Setting up

For adding a new integration, go to Maintenance → Integrations in your tracker and choose Facebook integration:

Click on "Add account":

The settings include:

Integration name. A name of the integration, can be any. You can set it for your convenience.

Cabinet ID. ID of the advertising account on Facebook (see below how to find it).

Token. Facebook API token (see below how to find it).

Use proxy. Use a proxy to request Facebook API.

# Assigning to campaigns

Each integration can be assigned to one or multiple campaigns in a tracker.

Choose the campaigns from the list.

# Getting the cabinet ID

Open the Facebook Ads Manager and copy your account ID:

# Getting API token

Open Apps page and press Create App

Choose Other, then None and press Next

Choose Business and press Next

Choose the app's name and add App contact email, then press Create app

Open app settings. Choose Marketing API

Press Tools and select all shown checkboxes, then press Get Token

Copy the token:

# Fixing integration issues

The main reasons why integration may not work:

  1. Outdated version of the integration API. Make sure that the version of the tracker (Admin-Keitaro v) that you use is not lower than 9.14.15. This version of the tracker has integration compatibility with Facebook API version 13.

  2. Incorrect token to connect to an advertising account via API. The page, from which the correct token is takenm looks like this:

  1. Absence of Facebook parameters, namely {{adset.id}} in the Campaign's settings in the Settings section and, correspondingly, in the campaign's link you place in the source. You can connect the parameters directly from the template, in the campaign's settings:

If you do not fill in the parameters or use values other than the template, no costs will be received:

If the traffic first goes to your site, to which the tracker is connected via any integration script (KClient PHP, Tracking script, and WordPress plugin), the placeholders from the source template needed to be added to the site URL as domain.com?adset_id={{adset.id}}&....

  1. In the FB ad settings only the campaign or integration site link are inserted with no additional parameters. On creating ad, the placeholders you get when using the source must be added in a separate form for the parameters.

# Integration FAQ

Error "Not tied to the campaign".

The integration is not selected in the campaign's settings in Keitaro.

Error "Success" status, but costs are not updating.

Make sure there is adset.id parameter both in campaign's parameters in Keitaro and in Facebook link.

Error "Integration shows an error".

Check the Facebook token, make sure it is not expired and valid for the account.

How does currency conversion work?

The tracker takes currency from the Facebook account and converts it into the tracker's currency.