How to import your advertising cost data into Google Analytics
Loves Data
If youâre running ads on Facebook, LinkedIn, Bing, Twitter, or any other advertising platform for that matter, you should consider bringing that data into your Google Analytics reports.
Why?
Importing this data allows you to compare the performance of your different advertising channels with ease. In a single report you can compare your advertising costs, engagement with your ads and even see if people are converting once they arrive on your website.
Hereâs an example of what youâll find if youâre running campaigns currently (and not importing your cost data)...

You can see that thereâs complete information for Google AdWords because itâs easily integrated with Google Analytics. (If youâre running AdWords and havenât linked your accounts yet, then definitely do this now, it should only take a few of minutes.)
In order to fill in the blanks for these advertising platforms we need to use Cost Data Import. This allows us to push the details about the advertising cost, the number of clicks and impressions into Google Analytics.
To import the data we need to use a âkeyâ so that the cost data is connected to the correct advertising channels within our reports. For this we need to be using appropriate campaign tagged URLs for our inbound advertising.

If youâre already familiar with campaign tags, then you can skip to the next section. If youâre not familiar with campaign tags, they basically allow you to send extra details into Google Analytics when people click through to your website from your own custom marketing initiatives.Â
Youâll need to define a campaign name, source and medium at a minimum. The campaign name is the overarching name of your marketing. Itâs completely custom though, so you might want to use something like âFacebook Adsâ or âSpring Promotionâ â something thatâs easy to understand and is easy for your to identify how those people found your website when youâre inside your reports.Â
The campaign source is used to understand where the message was seen. For example, you might use facebook.com for ads on Facebook, twitter.com for ads on Twitter and so on. The general rule is to use a domain name when possible.Â
Then there is campaign medium which should show how the message was communicated. For example, you would use cpc for search ads on Bing and social for paid ads on social networks.
For a more in-depth look at measuring your campaigns, read my post on the best ways to use campaign tagged URLs.
Now that youâre using campaign tags to measure people coming to your website from your advertising, you will need to take note of the source and medium youâre using. These will become the key used to import your cost data.
Hereâs an exampleâŠ
If youâre running ads on Twitter you will have a source of twitter.com and a medium of social this will now be what we use to import our Twitter advertising data against.
Next, we need to download our data from the advertising platforms. This can take some time if youâre doing it manually. There are solutions out there to automate this process for some platforms, including Facebook and Bing. If youâre interested in this then you might want to check out OWOX BI free and paid versions and Supermetrics Uploader paid version (affiliate link).
When youâre downloading your data manually, youâll need to ensure youâre downloading your data broken down by day.

Next up, we need to set up Google Analytics, so we actually head into the admin section and select âData Importâ under the Property column. Then click on âNew Data Setâ and select âCost Dataâ, name the data youâll be importing and select the reporting views where youâd like to make the data available.

Youâll see that the import keys are pre-set to source and medium. Then you select the data youâll be importing, you can select from Clicks, Cost and Impressions. I recommend selecting all of these as it wonât take any extra time to get all of this data into Google Analytics.
Now you can download the schema for uploading your data. This is just a fancy way to describe the column headings of the spreadsheet youâll be importing.
Hereâs an example:

Then itâs time to format the data into the spreadsheet, so ensure that you have the date on the left, then medium, source, clicks, cost and impressions.
Itâs also super important to use the correct date format for ga:date â you need to use year, then month, then day. So 1 November 2016 would become 20161101 (or yyyyMMdd).

From there, we can upload our data into Google Analytics and we'll now have this cost data, along with session right within Google Analytics.
Now you know how to import your advertising data into Google Analytics, so if someone says âit would be great to see that data inside Google Analyticsâ you have the answer!
Finally, you can create a custom report to compare all of your advertising efforts right within Google Analytics. Hereâs an example:

You can add this custom report to your own Google Analytics reporting view right now!