How to setup a data import for Facebook Ads

Setup a daily automated import of Facebook Ads cost data into your Google Analytics property.

Connect a Facebook Ad Account #

  1. Go to setup to be able to connect an account
  2. Then click on Facebook to view all Ad Accounts connected, as well as be able to connect a new account
  3. Click on “Add New Account”
  4. Select the Business Manager and then the Facebook Ad account you want to connect and save.

Create a Data Import #

  1. While still logged in, go to “Google Analytics Data Import
  2. Click on “New Data Import”
  3. Enter a name for the Data Import you’re creating
  4. Source: The Facebook Ad Account you want to send the cost data from
  5. Destination: The Google Analytics property you want to send the data to
  6. Data Set: The data set you created specifically for your Facebook Ads cost data
  7. Click “Save”

Setup Your UTM Tags in Facebook #

When you look into your ad details, you will see a section called Tracking, where you’ll see a field called URL Parameters ∙ Optional.

We currently only support the following Dynamic Parameters to be used for the UTM parameters for Source, Medium, Campaign, or Content (with plans to support the rest):

  • ad_id = {{ad.id}}
  • adset_id = {{adset.id}}
  • campaign_id = {{campaign.id}}
  • ad_name = {{ad.name}}
  • adset_name = {{adset.name}}
  • campaign_name = {{campaign.name}}
  • placement = {{placement}}
  • site_source_name = {{site_source_name}}

We’ve included below a UTM parameter structure to get you started. Just copy & paste the code below for all your Facebook and Instagram ads.

utm_source={{site_source_name}}&utm_medium=paid_social&utm_campaign={{campaign.name}}&utm_content={{ad.name}}&utm_id={{campaign.id}}

If you’d like to customize the UTM parameter structure, see the documentation here which shows all the available variables Facebook has available.

Read our complete article here: https://optimoanalytics.com/blog/how-to-import-your-facebook-ads-cost-data-into-google-analytics/