Import campaign data

Note: Campaign data import was previously called Cost data import.

Import campaign data, such as aggregated cost, clicks, and impressions, from your online advertising platforms to measure return on investment (ROI) and compare performance across all your marketing initiatives.

Google Analytics combines imported campaign data with revenue and events you're already measuring, including past events.

On this page:


About campaign data import

Using campaign data import, Google Analytics combines your imported data from campaigns outside of Google, like email and social media advertising, with revenue and key events data in Google Analytics. This allows you to:

  • Calculate non-Google metrics, such as non-Google cost per click and return on non-Google ad spend, for each campaign, source, and medium from your imported campaigns.
  • Compare performance data across all of your ads initiatives. You can find this data in Reports > Acquisition > Non Google campaign and in the Advertising workspace under Planning > All channels.

Google Analytics will report your aggregated cost, impressions and clicks on any combination of the imported dimensions, giving you insights into your imported campaign data. This provides you with a more complete, accurate view of your advertising performance, leading to more well informed decisions and more effective campaign optimization.

Keep the following in mind when using campaign data import:

  • Imported metrics are aggregated daily.
  • You can upload data for the same campaign IDs more than once. Because the true costs for ads change as campaigns run, it’s recommended to upload new data for the same IDs daily. Analytics will use the most recent uploaded data values for reporting and exploration.
  • The currency of cost imports should match the Google Analytics property currency.

The role of custom campaign URLs

To successfully combine your imported data with your collected session data, make sure that you add the following campaign tracking parameters to all destination URLs in your non-Google campaigns:

  • utm_id
  • utm_source
  • utm_medium
  • utm_campaign

Different platforms use different methods to include campaign id, name, source, and medium within an ad's click target (the link to your site that end users click). Choose auto-population features, if provided by your platforms. When those features aren’t available, you may have to provide full URLs directly to your platform.

The values you use for utm_source, utm_medium, utm_campaign, and date in your imported file must exactly match the values your users have logged.

For example: “Facebook” and “facebook” aren’t exact matches.

Learn more about how to Add utm parameters to URL

URL to campaign import values example

A pet store is running a summer sale. They tag the destination URL contained in their advertisement with campaign measuring parameters: utm_id, utm_campaign, utm_source, utm_medium. The resulting URL would look something like this:

http://examplepetstore.com?utm_id=123_1a2b3c_abc&utm_campaign=Summer%2BSale&utm_source=ad%2Bnetwork&utm_medium=cpc&utm_term=cpc_keyword&utm_content=hero

When a user clicks an ad with this URL, their visit to the example petstore website can be associated with the Summer Sale campaign. Analytics will set the following values for the session:

Dimension name in Analytics

Custom campaign parameter

Value set in Analytics

Campaign ID

utm_id

123_1a2b3c_abc

Campaign name

utm_campaign

Summer Sale

Source

utm_source

ad network

Medium

utm_medium

cpc

For Google Analytics properties, Source (utm_source) and Medium (utm_medium) are required. Campaign ID (utm_id) and Campaign (utm_campaign) are optional, but can be included in the import file. This ensures that Analytics has the campaign-tracking parameters associated with the session and that there is a way to join Analytics data with the external cost-data source for reporting purposes.

You can include additional parameters in your URLs that are traditionally used in Google Analytics properties like Campaign Term (utm_term) and Campaign Content (utm_content), but they aren’t required and can’t be included in the import file.

How to import campaign data

Google Analytics supports different import sources to set up campaign data sources, depending on your preference. These import sources connect to where you store your data and commonly require you to map data from your selected import source to the Analytics fields.

Google Analytics supports third-party (3P) advertising platform import sources. These import sources are a more automated, simpler approach to importing your data directly from your advertising platforms.


Connect to an import source

You can create a connection with any of the following available import sources where you already store your data:

Note: Each of these connectors will require you to prepare your campaign data for import. Learn how to Gather campaign data from your advertising platforms to import into Google Analytics.

Prepare your campaign data for import

Keep in mind that these import sources will require you to map the import fields to the Analytics fields. Campaign ID, Campaign source, Campaign medium, and Campaign name must match the custom campaign parameters utm_id, utm_source, utm_medium, and utm_campaign that you used in your destination URL.

Tip: Don’t upload a file that includes duplicate keys. Learn how to Understand data sources.

The following dimensions and metrics make up the structure of your imported data. Your upload file headers must match the schema you define for the corresponding import source.

Dimensions

Dimension

Requirement

Campaign source (utm_source)

Required

Campaign medium (utm_medium)

Required

Date (ISO 8601: YYYY-MM-DD)

Required

Campaign ID (utm_id)

Optional, but highly recommended

Campaign name (utm_campaign)

Optional, but highly recommended

Metrics

Note: At least one of the following metrics is required.
Metric Requirement


Clicks (daily value)

Optional

Cost (daily value in the format 0,000.00)

Optional, but expected
Impressions (daily value) Optional

Template for CSV file upload

Below is an example CSV template for campaign data. If you need to create your upload files by hand, use this example as a guide. Download the CSV import template for campaign data.

utm_id

utm_campaign

utm_source

utm_medium

date

impressions

clicks

cost

bing_123abc

Summer_fun

bing

cpc

2020-12-01

12242371

367271

36727.10

facebook_456def

Fall_delight

facebook

cpc

2020-12-01

3429267

34292

8573.00

twitter_789ghi

Winter_wonderland

twitter

cpc

2020-12-01

9732461

194649

29197.35

Install the Campaign Data import tool for Google Sheets

Install the Google Sheets Plug in for 3rd party Connectors to ease set up for Google sheets import type.


Connect to a third-party (3P) advertising platform import source

If you have existing campaign data via another import source that would overlap, delete those prior datasets before proceeding with this feature or risk duplicate data entries.

You can use available third-party (3P) sources to automate the connection process for many popular platforms, making the setup much simpler and more robust. Direct 3P import sources setup will automatically run daily. Google Analytics currently supports the following direct 3P sources:

Important: Third-party (3P) sources will attempt to pull 24 months of historical data into your Analytics property. All of your paid traffic from the selected 3P source should be tagged with a single unique value for utm_source and a single unique value for utm_medium. If your paid traffic supports more than one utm_source or utm_medium value, consider using another import source.

Post import details

For campaign data import, you can view 2 import health metrics in the data import details page:

  • % imported: The number of rows successfully imported divided by the number of rows in the import file. 100% means all rows successfully imported. This metric helps you understand whether any of your imported data was dropped due to some error.
  • Match rate: The percentage of imported rows successfully joined with Analytics data. A 100% match rate signifies that all imported rows were successfully joined. Campaign data is joined to Analytics data using the required keys (utm_source, utm_medium, and date). This calculation specifically considers the most recent 2 years of your imported data.
    • Example: If you import data for the last 7 days, the match rate will show you what percentage of the 7 day imported data set was successfully joined with Analytics data. If you import 3 years of data, the match rate will show you what percentage of the most recent 2 years of the imported data set was successfully joined with Analytics data.
Note: Google Analytics will report your cost, impressions and clicks on any combination of the imported required dimensions regardless of match rate. You’ll be able to get insights into your imported cost data even if there was no matching record with Analytics data.

After you upload your data, it can take up to 24 hours for Analytics to make that data available in reports, audiences, and explorations. Users have to engage with your campaign after you upload the data in order for those metrics and campaign properties to be associated with user activity.

You can overwrite metric and dimension values by uploading new ones for the same key set.


Delete an import source

Since campaign data import uses the reporting/query time join and doesn’t alter data that has already been processed, you can simply delete a campaign data source from the data-upload service to remove campaign data from Google Analytics reports. Learn more About Data Import.


Limitations

  • Campaign data: Campaign data import uses the reporting/query time join. This allows you to associate your imported campaign data with events already processed by Google Analytics.
  • Match rate: This metric only considers the most recent 2 years of your imported data.
    • Example: If you import data for the last 7 days, the match rate will show you what percentage of the 7 day imported data set was successfully joined with Analytics data. If you import 3 years of data, the match rate will show you what percentage of the most recent 2 years of the imported data set was successfully joined with Analytics data.
  • The currency of imported campaign data should match the Google Analytics property currency.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Main menu
5512094001034349609
true
Search Help Center
false
true
true
true
true
true
69256
true
false
false
false