Facebook and RedTrack
What’s Facebook/Instagram?
Both Facebook and Instagram have the same ad managing interface (Facebook Ads Manager), so this article describes the flow for both platforms.
There are limited cases when Facebook allows you to use the redirect link (e.g. RedTrack campaign tracking URL) but we as a service provider do not recommend it and cannot guarantee safety.
Traffic filtering functionality is limited for Facebook and can be used for the Offer level only (for the cases when you run the traffic to the landing page first). For more details go to the Traffic filtering guide.
Facebook integration allows you to:
- pass all the conversion data back to Facebook (even the extra conversions), attach it to the campaigns (not only to the events manager), and help Facebook to optimize your traffic for even better traffic matching;
- pause non-converting creatives and campaigns directly on the Facebook side, no manual work;
- auto update your cost data.
Integration checklist
1. Before you begin
2. Add a Facebook template
Add a Facebook template and integrate it with RedTrack.
1. Traffic Channels → New from template → find Facebook → Add → Save:
The following parameters and their roles are essential for the API cost integration:
{{ad.id}} should always be with Aid role
{{adset.id}} should always be with Gid role
{{campaign.id}} should always be with Cid role
2. Since it is a complex API integration, we need to get permission to integrate from Facebook first. In the added template press Connect Facebook → verify your ad account:
3. Create a campaign in RedTrack
1. Create a campaign in RedTrack using this guide. Once the campaign is created, all the tracking links and the parameters for the script will be generated automatically and include all the supported macros.
2. For Facebook tracking you will need to use the tracking script. Follow this guide to choose the one that suits your needs better and set it up.
Since Facebook does not like redirect tracking, you will have to use our script on the page code.
You will need to add the tracking parameters later on the Facebook side. The parameters depend on the type of script you have chosen before and can be taken from the “universal script” or “no-redirect” tab within campaign settings:
1. Create a campaign in RedTrack using this guide. Once the campaign is created, all the tracking links and the parameters for the script will be generated automatically and include all the supported macros.
2. For Facebook you will need to use our universal tracking script. The universal tracking script is created automatically once you’ve added the Website and can be taken from your RT account → Scripts. The script should be placed on the page code or for your e-commerce store (check out the precise e-com guide for details).
The tracking parameters are to be copied from the campaign settings and saved for later:
4. Set the conversion events for Facebook
Use this guide to help you add the events you plan to use to RedTrack. It will automatically send your conversion types to Facebook exactly as you name them.
– We recommend keeping a Purchase name for one of your conversions so that you do not need to make any adjustments on the Facebook side since Facebook knows this name very well and will optimize the traffic better for a Purchase than a custom name (Sale, Conversion, etc.).
If you are using non-standard names for the events you send to Facebook (something apart from Purchase, ViewContent, InitiateCheckout, Lead), you need to set them up on Facebook, too:
1. Events Manager → Custom conversions → Create custom conversion:
2. Fill in the fields in the pop-up window:
- Name: give your custom conversion a name
- (optional) Description: add a description to distinguish your custom conversion from others in the list
- Data source: select the data source
- Action source: select the action source to which your custom conversions are attributed (it should match with the one you will set inside RedTrack)
- Event: select the event URL
Refer to this article for learning more about standard event categories in Facebook.
- Rules: set the rules by URL or event parameters. You can select the parameters that you currently send with the event you selected. If you don’t see the parameter you want to choose, update your pixel or Conversions API setup to send the parameter with your event.
For example, if you create a custom conversion using a purchase event and type in Product A, Product B and Product C in the content_id parameter value, the custom conversion measures when someone purchases product A, B or C.
▸ Rules that follow the AND condition.
For example, if you create 3 separate rules for content_id equals A, content_id equals B, and content_id equals C, the custom conversion measures when all 3 events occur.
Refer to this article for more info about Rules within this setup.
- (optional) Enter a conversion value: click to check the box next to Enter a conversion value, then enter your value. Only use this field if the events in your custom conversion don’t have a conversion value.
▸ Filtering events in Meta Events Manager
▸ Best practices for custom conversion setup in Meta Events Manager
▸ How to edit custom conversions in Meta Events Manager
▸ How to delete custom conversions in Meta Events Manager
3. Once you’ve created your custom conversion, to activate it, navigate to the page of your website it’s referencing to trigger it. Then get back to the Events Manager → Custom conversions tab and see if the added conversion changed its status to Active:
5. Generate the Conversion API Key
Your Facebook account → Events Manager→ pixel settings → Settings → Create Access Token:
6. Verify the domain for Facebook
Due to the new Facebook policy, you should now verify the domain you will be using for your Facebook campaign. This is an action that should be done on your Facebook account.
– via meta tag
– via the uploaded HTML file
– via DNS record
For details on the domain verification procedure on Facebook, check out the following guides:
– Domain verification in Meta Business Manager
– Methods of domain verification on Facebook
The steps below will demonstrate the DNS record management method.
1. Business Manager → Brand Safety and Suitability → Domains → Add → Create a new domain:
2. Paste your domain → Add:
Correct: website.com.
Incorrect: www.website.com or https://website.com.
3. Select the target domain → choose the DNS verification method:
4. Copy your unique TXT value:
5. Go to your domain registrar → open DNS settings and add a new record with the following values:
- Host: @
- Points to: your unique TXT record from point 4
- TTL: the lowest possible
6. Give it some time for the data replication to happen (approximately 1 hour), then verify the domain in your Facebook domain settings:
7. Associate the domain with your page:
8. Get back to RedTrack → settings of the added Offer (for Affiliates)/ Website (for Advertisers) → CAPI (Maximize signals) → add the values for Default Action source and Default Event URL → Save changes to the template:
- In the Default Action source select from the drop-down the type of the conversion to be set for Facebook API.
- In the Default Event URL add the verified domain. The domain should be secure, use the following link format: https://your.domain.com.
7. Find and copy your FB pixel
You can find your unique pixel ID in the Facebook campaign settings → Tracking:
8. Add the pixel to RedTrack
There are 2 ways of adding your FB pixel to RedTrack:
Go to the settings of the added Offer/Website → CAPI (Maximize signals) → Add your Meta (FB) pixels to send the conversions with the Meta (FB) conversion API → add the the pixel, token and other needed values → Save changes to the template:
Together with the Pixel ID add the Conversion API key for that pixel.
- Action source: we recommend using the Website option
- Event URL: the domain verified for Facebook. Use the “https://domain.name” URL structure.
Go to the settings of the added Facebook traffic channel → Facebook default data source (pixel) → add the the pixel, token and other needed values → Save changes to the template:
9. (if you haven’t done it already) Create an ad on Facebook
Ads Manager → Create Ad → create a new campaign or use an existing campaign → set up campaign parameters → copy paste your LP URL/Website URL (the link without tracking parameters) under the website URL → add additional tracking parameters (universal script or tracking parameters (UTMs)) in the “URL parameters” section
– If you need to be sure you receive the correct names, add them to the tracking parameters manually or analyze the data by IDs instead:
cmpid=5f92a30bc860ee0001fa9996&sub1={{ad.id}}&sub2={{adset.id}}&sub3={{campaign.id}}&sub4=myad&sub5=myadset&sub6=mycampaign&sub7={{placement}}&sub8={{site_source_name}}
– If there are already some UTM parameters in the URL parameters field, you do not have to delete them, just append the parameters taken from your campaign in RedTrack to the already existing parameters with the help of the ampersand symbol: “&”.
Use this tutorial to help you add your LP URL and tracking parameters properly in Facebook Ads Manager.
10. (optional) Warm up your Facebook account with test conversions
To start running a live campaign, you need to make sure everything is up and running. And at this point, we will need to warm up your account with some fake conversions.
1. Once you’re done with the integration and have created a Facebook campaign, you need to run some live clicks from Facebook.
We will need them for conversion generation. To find your clicks, go to Logs → Clicks:
2. Tools → Conversion tracking → copy the link from the S2S conversion tracking field:
3. Put the clickid from step 1 instead of the replace_me part in the postback URL you copied within step 2.
4. Paste the link to the browser and press enter. You should get this successful message:
5. The conversion will appear in your RedTrack account. Do the same with different click ids within a day. You will need approximately 20 conversions to warm up the account.
Facebook needs a bit more time to attribute the conversions to your campaigns. It can take 48 to 72 hours to see the data.
11. Set up the automation
Set up the automation.
- Use this guide to help set up rules.
- Use this guide for setting up the auto update cost feature.
12. Increase the event match quality
If you work with an affiliate offer, having a 10/10 match quality is impossible. There is a list of parameters Facebook wants to receive, but only half of them can be covered by any third-party tool. This causes the match quality to be at a low level. And it’s not something you should struggle with.
However, RedTrack has a feature that can help you to improve the event match quality with Facebook. It does not take any additional values from Facebook, but if you have them on your website/affiliate network side (for example, order ID at Shopify) or store them on your side, you can send them to RedTrack and then to Facebook to increase the event match quality.
For the cases where you do not work with any offer source and promote your offers, this feature can be used only if you store the data on your side and have the technical capabilities to add this data to the conversion triggered.
1. Make RedTrack identify and accept this data with a postback first
Offer sources / Brands → Additional parameters → add the required parameters, macro, name and assign the roles → Save changes to the template:
◉ Macro/Token where you have to insert {r} or {replace}.
◉ Role where you assign your parameters a certain role. The list of supported roles can be viewed in the dropdown:
Data in the following columns is OPTIONAL but useful:
◉ Parameter: that’s where you give your parameter a name, but can leave it empty and in the tracking URL your parameters will be called sub1,2,3 etc.
◉ Name / Description: that’s the name you’ll see in the reports instead of sub1,2,3. For your convenience you can customize these names as you wish.
2. The added parameters will be appended to the Postback URL which you should copy:
3. Paste it to your offer source S2S postback settings as usual (or in any other postback option you use on your side).
Once the conversion postback containing those values is sent to RedTrack, we will grab it → attribute it to the appropriate campaign → send it to Facebook with the specified role.
Troubleshoot
Possible errors
Account disconnected
Sometimes, Facebook can disconnect your account randomly for security reasons (you will notice that almost immediately since the cost data stops coming at that point). All you need to do in that case is to reconnect.
Missing Purchase Currency and Value Parameters
“One or more of your Purchase events is missing a value and currency parameter. This may affect your return on ad spend calculation.”
If you have the value optimization on, some conversions still do not get the value. We always send the currency and value by default. This issue can be observed with test conversions. So it’s essential to send all values during the test.
Purchase Event Missing Deduplication Parameter
Most probably, you are using Conversion API and pixel at the same time (for example, send the same data from RedTrack and your website or use RedTrack CAPI and some other system CAPI). In this case, you might see both server and pixel type under the event in your Facebook account.
Use only the RedTrack Conversion API to solve the issue.
Another reason can be a duplicate from a pixel or Conversion API without any unique event value, Facebook can recognize. What can be done? Check out this guide.
Conversion attribution issues
Conversion attribution may differ due to the FB algorithms (for example, they can be sent to different adsets if Facebook considers attributing some particular conversion to another adset)
Facebook has a 7-day attribution window. If there are less than 7 days between click and conversion, Facebook will attribute it. If the conversion is older than seven days, FB can exclude it from your statistics.
You cannot do anything with the conversion attribution.
Purchase Events May Be Dropped Due to Missing Event Source URL Parameter
Make sure you have followed the Facebook integration guide, verified your domain, and added it to your RedTrack offer settings.
Cost update issues
Here is what you need to check on your side:
1. The traffic channel should be connected from the Facebook template. No error is shown;
If it is not connected or you are not sure, re-connect it.
2. The correct account is connected.
3. The dynamic parameters such as campaign id, adset id and ad id are received by RedTrack (Logs → Clicks → check sub values).
If there are no parameters in click logs, that means we are not receiving them from Facebook. Either these are your test clicks, or you need to check the Facebook campaign settings to have the parameters string in place.
4. The correct roles are assigned to the dynamic parameters;
For the cost update to work properly, the following roles should be obligatory assigned to the Facebook ids in your traffic channel settings:
5. Check the cost model you use in the campaign settings (should be CPC) and if the Auto-update cost toggle is on inside the campaign settings.
What you can check to understand why the cost data is incomplete (higher or lower than the one you have on Facebook):
1. The first thing you need to compare is the IDs. RedTrack takes the cost data per ID (campaign, adset or ad, depending on your subscription level), so if some of the ID is missing, its cost data will not be taken to your RedTrack report.
Check if all IDs are received in RedTrack (campaign report → group by (target ID used for the cost update) → check the list). If not, check this campaign, adset or ad in Facebook and ensure the dynamic parameters are added to pass the ID.
2. Check if the correct roles are assigned to the Facebook IDs in RedTrack. This can be checked in your traffic channel settings:
3. Check if the time zones match in your RedTrack account setting and in Facebook.
If the timezones of your traffic channel and RedTrack don’t match or the timezone within your ad accounts in the traffic channel do not match (for the cases when you run traffic from different ad accounts to one RedTrack campaign), the cost data matching is impossible.
4. Check the cost logs in RedTrack: if costs stopped coming for some time and caused this discrepancy, you might need to reconnect Facebook.
5. Make sure the currency matches in both systems.
Lost events
Sometimes, you might need to check if there are events coming to Facebook and how they come to understand if anything goes wrong.
Business Manager → Data Sources → Datasets → choose the pixel → Open in Event Manager:
Your events are displayed under the Review: