Getting started

  1. Inside the admin panel click Add Data Source.
  2. Choose Facebook from the list.
  3. Click Authenticate with Facebook and go through the authentication flow.
  4. Select accounts which cost data you would like to import.
  5. Click Save.

Supported dynamic URL parameters

By default Facebook allows to use a lot of dynamic URL tagging parameters to track campaigns.

SegmentStream supports the following parameters:

Name Description
{{ad.id}} The unique ID of the ad.
{{adset.id}} The unique ID of the ad set. An ad set is a group of ads that share the same budget, schedule, delivery optimization and targeting.
{{campaign.id}} The unique ID number of the ad campaign. A campaign contains ad sets and ads.
{{ad.name}} The name of the ad
{{adset.name}} The name of the ad set. An ad set is a group of ads that share the same budget, schedule, delivery optimization and targeting.
{{campaign.name}} The name of the ad campaign. A campaign contains ad sets and ads.
{{site_source_name}} Depending on where the ad appeared this parameter has four possible values.
fb - Facebook
ig - Instagram
msg - Messenger
an - the Audience Network
{{placement}} Depending on where the ad appeared this parameter has possible values.
Facebook_Mobile_Feed
Facebook_Right_Column
Facebook_Instant_Articles
Facebook_Instream_Video
Facebook_Marketplace
Instagram_Stories
Instagram_Feed
Instagram_Explore
Messenger_Inbox
Messenger_Stories
Facebook_Desktop_Feed
an (for Audience Network)
Others (for all other placements)

Default source/medium

Facebook allows running ads that do not lead directly to your website (for example Facebook page promo, Facebook post promo, events promo, etc). This means that these types of campaigns can not have UTM-params and it is not possible to import them into Google Analytics due to limitations that require all imported costs to have campaign source and medium defined.

As a workaround, you can define default UTM-source and UTM-medium for your Facebook data source to see costs for these campaigns inside your Google Analytics account.

This document was last updated on August 17, 2020. If you notice any gaps, outdated information or simply want to leave some feedback to help us improve our documentation, please let us know!