Schrödinger's Ad

  • Wednesday, May 20, 2020
blog-image

This post shows how to connect cost and impression data from Facebook and Instagram with web tracking-data in order to create a full marketing report and make the most out of Facebook’s “automatic placements”.

Often one of the first reports to build is the marketing report. This report puts the money spent on marketing campaigns and orders generated by marketing campaigns next to one another and allows to calculate the classical metrics like ROIs, CACs and CPOs. The first part to this equation is getting the attributed transactions – your orders and the marketing channel that lead to the order. You would typically get this from your web analytics tool like Google Analytics.

Classical Marketing Report Example

Classical Marketing Report Example

The next part is that you need the marketing spend – the cost each marketing campaign has generated. In the case of Google Ads this is usually very easy, because if you link your Google Ads-account with Google Analytics these data become automatically available in Google Analytics under the metric “Cost”. For other channels this is a bit harder and in order to retrieve the data you need to get it from the marketing channels directly. All larger marketing channels offer an API, which you can connect to in order to retrieve the cost data. In theory the cost data could be uploaded manually to Google Analytics, but it is much more advisable to make the connection in your reporting.

Cost per campaign in Google Analytics

Cost per campaign in Google Analytics

The screenshot above shows a typical extract from Google Analytics. Costs for the Google Ads-campaigns are available, while costs for the other channels aren’t automatically transfered to Google Analytics and thus shown as zero.

Problem one – campaign names are inaccurate

The problem arises when these data are merged. You need some kind of identifier to join the orders from the web analytics tool with the cost data from your marketing channel. Typically this would be the campaign name, but this is not optimal. The campaign name you see in your web analytics data depends on what gets passed via the tracking links (utm-parameters) and the joining works only as long as the campaign name is the same in the interface as the one passed in utm_campaign. Unfortunately most of the time setting tracking links is a very manual process and errors happen frequently, campaigns get renamed or simply the naming is a different one. Asking from your marketers to change the names of all of their campaigns manually is usually not met with a lot of enthusiasm.

Problem two – Schrödinger’s Ad

The ad being in a state between Facebook and Instagram ad

The ad being in a state between Facebook and Instagram ad

Even worse, with its automatic placements Facebook enjoys a lot of autonomy when in comes to placing an ad. The exact same ad might be shown in the Facebook News Feed, the Instagram Feed, the Facebook Marketplace or in the Facebook Messenger Inbox (and even more) and Facebook decides this on the go. This is what I have dubbed Schrödinger’s Ad, because as long as noone looks at the ad, nobody knows whether it is an Instagram or a Facebook ad. As you might imagine, this is quite inconvienient for our marketing report and for correctly attributing transactions to marketing cost per channel

The solution – Part one

But do not despair. Actually Facebook provides quite a convenient solution for both problems, making the joining of the two data sources much more convenient. It’s called URL parameters and allows you to set tracking links dynamically. This would allow you to set the campaign name automatically with the name used in the interface (e.g. entered by the marketer). All you would have to do is create a tracking link that looks something like this: https://yourwebsite.com?utm_source=facebook&utm_medium=paid&utm_campaign={{campaign.name}} The part in the curly brackets will get replaced automatically by Facebook with the name once the ad gets shown.

Campaign id now now available in Google Analytics

Campaign id now now available in Google Analytics

But much more interesting for us is the option to either add the ad id or campaign id (parameters “{{ad.id}}” and “{{campaign.id}}") to the link. You could pass these with a utm-parameter that is usually not used by Facebook, like “utm_content”. Your tracking-link would then look similar to this: https://yourwebsite.com?utm_campaign=utm_source=facebook&utm_medium=paid&{{campaign.name}}&utm_content={{campaign.id}} and you would have the conversions attributed directly to a facebook campaign id (or ad id for even more granularity). Obviously this is a lot more stable than trying to match for the campaign name, allowing for a one to one mapping. The id then becomes available in Google Analytics under the Dimension “Ad Content”. If that should be used already in your case, “utm_term” which will be shown under the dimension “Keyword” can be used as an alternative.

The solution – Part two

But, you still need the placement. Schrödinger’s Ad only decides once it gets shown, so even the ad id is the same despite the different placement. So you might want to do something like this: https://yourwebsite.com?utm_source=facebook&utm_medium=paid&utm_campaign={{campaign.name}}_{{placement}}&utm_content={{ad.id}} and add the placement to your tracking link, so that you can extract that as well from the data.

Placement now gets added automatically to the campaign name

Placement now gets added automatically to the campaign name

With this your cost attribution should work like a charm and you should be able to produce an amazing and accurate marketing report. Let me know if you’ve had a similar problem and how you solved it. :)