This document describes how campaigns and other traffic sources are measured using the the Universal Analytics platform.
More
|
Overview
Users arrive at your website or application through a variety of sources, including search engines, social networks, advertising campaigns, and more. By using Google Analytics to measure these campaigns and traffic sources, you can improve your marketing efforts and user experiences.
This reference guide will describe how Google Analytics collects, processes, and reports this campaign and traffic source data.
Understanding Campaigns & Traffic Sources
In Google Analytics, the search engines, social networks, ad campaigns, and other sources that send users to your property are collectively known as campaigns and traffic sources. The process by which campaign and traffic source data is sent to Google Analytics and populated in reports has a few steps:
- Collection – values are sent to Google Analytics in the campaign and traffic source fields using the SDKs or tracking code.
- Processing – collected values are used to populate the final report dimensions according to a processing logic.
- Reporting – campaign and traffic source dimensions and metrics become available in the web interface and Core Reporting API.
Developers can customize some of the collection, processing, and reporting behavior by using the available Advanced Configuration options.
The next sections describe in more detail how campaign and traffic source data is collected, processed, and populated in your reports.
Collection
The Google Analytics SDKs and tracking code use these fields when sending campaign and traffic source data:
| Field Name | Protocol Parameter | Field Description | Sample Value |
|---|---|---|---|
| Campaign Source | &cs; |
Sets the source dimension in reports. | email_promo |
| Campaign Medium | &cm; |
Sets the medium dimension in reports. | email |
| Campaign Name | &cn; |
Sets the content dimension in reports. | january_boots_promo |
| Campaign Content | &cc; |
Sets the content dimension in reports. | email_variation1 |
| Campaign Term | &ck; |
Sets the term dimension in reports. | winter%20boots |
| Document Location | &dl; |
Sets dimensions when custom campaign (utm) parameters are embedded. | http://store.example.com/boots?utm_source=promo_email
&utm;_medium=email&utm;_campaign=january_promo
&utm;_content=copy_variation1 |
| Document Referrer | &dr; |
Describes the referring source and may set dimensions when no other campaign or traffic source fields have been set. | http://blog.blogger.com/boots |
Note that each session may only be attributed to one campaign or traffic source. Thus, if new campaign or traffic source values are sent to Google Analytics at collection time in the middle of an existing session, it will cause the current session to end and a new session to start.
Processing
During processing, traffic source and collection field values are finalized into dimension values and attributed to visits or sessions. The Campaign & Traffic Sources Processing Flowchart illustrates the processing logic:
Additionally, see below for an overview of how the most common campaign and traffic source types are processed in Google Analytics:
Processing Custom Campaigns
A session is processed as a custom campaign when custom campaign parameters are embedded in the document location field, or when the campaign source field is set. When a custom campaign is processed, the values of the custom campaign parameters or explicit campaign fields map directly to the dimensions in reports.
For example, the following document location field value:
&dl;=http://store.example.com/boots ?utm_source=promo_email &utm;_medium=email &utm;_campaign=january_promo &utm;_content=copy_variation1
would be processed into the following final dimension values:
source=promo_email medium=email campaign=january_promo content=copy_variation1
Processing Search Engine (Organic) Referrals
Search engine referral data is processed by comparing the hostname and query parameter of the document referrer field to a list of known search engines and their query parameters. The first known search engine that matches both the hostname and query parameter of the document referrer value is used to set the report dimension values.
See the list of default search engines.
The default list can be configured with additional custom search engines. Learn how to configure custom search engines (Help Center).
Note that if the user has performed a secure Google search via HTTPS, the
keyword dimension will automatically be set to (not provided).
Processing Search Engine (Paid) Referrals
A session will be processed as a paid search referral when custom campaign parameters or AdWords / DoubleClick click IDs are used in the ad's destination URL and are sent to Google Analytics in the document location field.
If custom campaign parameters or click IDs are not used, the session may be processed as organic instead.
Processing Social Network Referrals
Social network referral data is processed by comparing the hostname set in the document referrer field to a list of known social networks. The first known social network that contains the hostname string will be used to populate the source dimension in reports.
Processing Direct Traffic
A session is processed as direct traffic when no information about the referral source is available, or when the referring source or search term has been configured to be ignored.
Learn more about referrer and search term exclusions.
Reporting
After processing, the following campaign and traffic source dimensions and metrics will be available in reports:
Dimensions
| Web Interface | Core Reporting API | Description |
|---|---|---|
| Source | ga:source | The source of referrals to your property. |
| Medium | ga:medium | The type of referrals to your property (e.g. email,
cpc, etc.) |
| Campaign | ga:campaign | The name of a marketing campaign sending users to your property |
| Ad Content | ga:adContent | A description of the advertising or promotional copy used to send users to your property. |
| Keyword | ga:keyword | The keyword searched by users to reach your property. |
| Social Network | ga:socialNetwork | Name of the Social Network that referred users to your property. |
| Referral Path | ga:referralPath | The path of the referring URL (e.g. the value of the document referrer field) |
| Social Source Referral | ga:hasSocialSourceReferral | Indicates whether a session was a referral from a social
network. The possible values are Yes and No |
Metrics
| Web Interface | Core Reporting API | Description |
|---|---|---|
| Organic Searches | ga:organicSearches | The number of organic searches that happened within a session. This metric is search engine agnostic. |
Additionally, in the case of paid AdWords or DoubleClick campaigns, there are additional fields available that can be populated automatically by setting either AdWords or DoubleClick click IDs, or manually by using cost data upload.
Learn more about cost data upload.
Advanced Configuration Options
The following advanced configuration options may be set at the property level:
Campaign Timeout Period
The campaign timeout period determines how long a particular campaign or traffic source is associated with a unique user.
Learn how to configure the campaign timeout period (Help Center).
Custom Organic Search Sources
Custom organic search sources can be configured at the property level. These custom sources can be added in addition to the default list of search sources.
Learn how to customize organic search sources (Help Center).
Excluding Referrers and Search Terms
Users may exclude certain referring sources or organic search terms from reports by setting these exclusions at the property level.
To prevent "self-referrals" in web measurement, where sessions are attributed to a referral from your own domain, users should add the hostnames they are measuring, as well as the hostnames of any third-party payment gateways, as excluded referrers.