API Integrations

Facebook/Instagram (main integration guide)

Both Facebook and Instagram have the same ad managing interface (Facebook Ad Manager), and this article describes the flow for both platforms. The most crucial point of this guide is that redirect URLs are forbidden on Facebook. If such URLs are detected on the account, they will be blocked immediately (even if you are using them in your Instagram stories directly). Facebook prohibits redirects as they potentially can lead to restricted content (adult, dating, etc.)

For all of your Facebook campaigns, no-redirect tracking with a custom tracking domain should be used instead.

Facebook integration allows you to:

  • pass all the conversion data back to Facebook, attaching it to the campaigns (not only to the event manager) and optimise the campaigns inside Facebook
  • pause non-converting creatives and campaigns directly on a Facebook side, no manual work

Due to Facebook restrictions, conversion data can be delivered to Facebook within 24 hours.

1. Add Facebook template to RedTrack.

Go to Traffic Sources -> New -> find Facebook -> Add the template:

2. You can modify some Facebook parameters in the template. Once you did it, click Save:

Blocked (greyed) parameters cannot be changed and should be used in the same order under the same sub-values. It’s essential for the API integration.

Add “fbclid” under sub9 alias and save it. This parameter is required for sending conversion information back  to Facebook.

3. Integrate your Facebook account with RedTrack.

Once you save the source template, the “Connect” button becomes active. Since it is a complex API integration, we need to get permission to integrate from Facebook first. Press connect and follow the steps after (it will ask you to verify your ad account).

You will be redirected back to your RedTrack account settings. This means Facebook accepts the integration, and you can add your Conversion API key and Pixel ID.

At this step, you integrate your Facebook Business Manager for the accurate cost update.

4. Now, you need to generate the Conversion API Key.

Go to your Facebook account -> pixel settings -> settings -> Conversions API -> Create Access Token

Once generated, copy it, and add to your RedTrack integration settings, save the changes.

5. Add your FB pixel to RedTrack.

You can find your unique pixel in your campaign settings.

Put it to your traffic source settings. Save the changes.

This block is essential if you want to send the conversion data back to Facebook. The pixel you add in the traffic source settings is the default one, additionally, you can add more pixels to send the data to on the Offer level.

6. Set the conversion events for Facebook. It will be sending your custom conversion types to Facebook automatically.

Conversion information will fall to your pixel/data source.

7. Verify your domain on the Facebook side.

8. Create a campaign in RedTrack.

Now that we have the traffic source in place, it is time to set up a new campaign. Here is more information on how you can do this.

Since Facebook does not support redirect tracking, you will have to use our direct traffic script for that purpose.
Your no-redirect script will be generated automatically and include all the supported macros.  Copy the script and add it to your landing page code.

More information on no-redirect tracking is available here.

9. Create an Ad on Facebook.

Open Ads Manager > Create Ad > Create New Campaign or Use existing Campaign -> set up campaign parameters -> copy your LP URL (the link without tracking parameters) to the Destination URL field (for some ad types, it is called Website URL):


Add additional tracking parameters to your URL through the “URL parameters” section:

Make sure there are no special symbols that can break the URL (#, %, etc.) in the names of your ads and campaigns – otherwise the data won’t be tracked. sub=FB value should be the same as you have in your RedTrack account (step 2 of this guide).

10. Warm-up your Facebook account with test conversions.

11. Configure your events inside Facebook.

12. API Integration Conditional postbacks:

In case you want to send the particular conversion types to Facebook, in your campaign settings, go to the Integration postback field -> choose the types needed:

13. Set the automation and enjoy!

Related Articles