Tag campaign URLs

To perform ROI analysis on paid campaigns, cost data from external sources
can be joined with session data in Google Analytics by adding
campaign
tracking parameters to all destination URLs in the non-Google ad system
you're using.

Example

In the following example advertisement, the destination URL is tagged with
campaign tracking parameters (utm_campaign,
utm_source, utm_medium, utm_term).
This ensures that visits to the website from ad clicks are associated with the
summer sale campaign in Google Analytics.

When the user clicks the ad, they will be taken to the pet store website and
the following values will be set in Google Analytics for the session:

Dimension Name in Google Analytics Web Interface

Campaign tracking parameter

Value set in Google Analytics

Campaign Name

utm_campaign

Summer Sale

Source

utm_source

ad network

Medium

utm_medium

cpc

Keyword

utm_term

dogbone

This ensures that Google Analytics has the campaign tracking parameters
associated with the session and that there is a way to join Google
Analytics data with the external cost data source.

Create a data set

To import your cost data you must create a
Data Set. A data set is used to represent one or more external data
sources in Google Analytics. A data set can only be created through the Web
Interface.

Under the property tab of the admin page perform the following steps:

Select the Data Import tab.

Click the New Data Set button.

Select the Cost Data for the type and click
Next Step.

Name the data set and select one or more views (profiles) to enable Cost
Analysis in reports and click Next Step.

Select the Dimensions and Metrics you intend to
upload.

Select the desired Import Behavior.

This setting controls whether to overwrite or sum cost data in cases
where a duplicate key is found. To learn more about import behavior
see the
Cost Data Summation vs Overwrite section of the Data Import
Developer Guide.

Click Save.

Figure 2: Creating a cost data set.

Prepare the cost data CSV file for upload

Google Analytics expects cost data to be uploaded in a specific format with
certain values. You need to make sure that the cost data exported from an
external source meets these requirements before uploading.

The primary modifications and validations that you need to make to the CSV
file are:

Rename the column headers to match those recognized by Google Analytics.
You can retrieve the header from the data set details page in the web
interface.

Add any required values that are missing.

Where applicable, values in the CSV file should match the values used for
campaign tracking parameters.

Example

With the pet store example, the data is exported in aggregate, and saved as a
CSV file:

Figure 3: Exported cost data CSV file.

The CSV file is then modified to meet the format required by Google
Analytics:

Figure 4: Formatted cost data CSV file.Note that for the first row of cost data,
the values for ga:source, ga:medium,
ga:campaign, and ga:keyword are consistent with the
campaign tracking parameter values set as part of the ad URL.

Once you’ve prepared the CSV file, the format should look similar to the
following example: