Why and How to Import Cost Data to Google Analytics (+Template)

After you upload your file, you will get a status notification whether the file was accepted (Completed) or not (Failed). I purposely uploaded my file a few times with incorrect data to show you what you may see.

you can reference this sheet as an example), each of the data points mentioned in the previous section must be in their own column. 

After you click “Continue,” you will need to name your data set and select the Google Analytics views the data set should be applied to. Then I’m going to select the data set schema options that I laid out in my spreadsheet example. Notice how the IDs match my column headers

how to import cost data into google analytics—csv template

Examples of such tools (ours included):
Yes. There are several popular tools on the market that can automate the process of importing ad cost data on a daily basis.
You can see how easy it is to find your errors and correct the mistakes.
When you are in Google Analytics, go to your Admin section. Then click on the “Data Import” link which will be at the very bottom of your Property column.
Upload your CSV file
Correct any mistakes
And when making our column headers, we can’t just add the words “Campaign” or “Medium.” We have to make sure our headers are formatted properly. If you do not do this, your upload will be rejected.
You simply connect your Google Analytics account, select the ad platforms you use, and the system automatically imports your ad cost data on a daily basis.

how to import cost data into google analytics—schema id tab

Name your data set

How to import cost data to Google Analytics

It can take a few hours to have your data start showing up in Google Analytics. But now you can create a custom report to start seeing cost data from your other paid media channels in Google Analytics.
Click on the red “Create” button. Then choose Cost Data

how to import cost data into google analytics—data import tab

When you are in Google Analytics selecting your columns, you will see the schema ID as you see in the image below.
To do this, hit Edit in the upper right corner of your report. Here, you can add metrics and adjust your dimension drilldowns.

how to import cost data into google analytics—data set types

The next major formatting rule is for the Date. You need to have your Date formatted as YYYYMMDD. Any other date variation will not be accepted and your upload will be disapproved. And because the format is YYYYMMDD, this means any date information you pull needs to be at the day level.
And as I mentioned above, you can also create a dashboard with the same information in Data Studio.

how to import cost data into google analytics—schema options

This example I provide is pulling LinkedIn information for one of my clients (campaign names changed) for June 2021.
File name

how to import cost data into google analytics—manage uploads

For help with improving your metrics, check out these additional posts:
If your upload Status comes up as Failed, you can click on the Failed link to get information on exactly what needs to be fixed. Here’s one example when I used incorrect column headers.

how to import cost data into google analytics—import status

Thanks to such tools, you don’t need to go into each advertising account and manually export ad cost data for the selected period, then prepare a CSV file in the format required for import into Google Analytics.
Refresh as needed 

how to import cost data into google analytics—reasons for failed import

Several times, I have had clients ask how they can see cost information for non-Google channels in Google Analytics. They do not want to go into each paid media channel to review the data. And even if I create a Google Data Studio dashboard compiling all of the data, certain clients are just used to Google Analytics. So what do I do?
In the above example, we’re sorting by Source/Medium and can see Cost, CTR, and CPC data. But you can also add a secondary dimension to view by campaign, ad content, keyword. And you can add additional metrics such as ROAS, transactions, revenue, RPC (revenue per click), and more.
So instead of having Date as your column header, you need to format it as ga:date. Instead of Medium as your column header, you need to format it as ga:medium.

Your cost data is now visible in Google Analytics

Select data import from the property column

cost analysis tab showing cost data in google analytics

Last, if you are importing campaign names, I recommend that you make sure the names in your file uploads match any campaign names that you might manually tag in your URLs. If you don’t do this, you could have duplicate campaigns showing up in Google Analytics and the data may be split between the same campaigns with different names.

How to customize your cost analysis report

Column header format
When you save the data set, you will then have to go back to the main Data Import page. Next you will want to click on “Manage uploads.”

customized cost analysis report creation in google analytics

Is it possible to automate the cost data import process?

As you can see there are a few steps you have to take to get this information into Google Analytics, but these tasks do not take long to complete.
Create new data import
Now that we have this in place, let’s go to Google Analytics and upload the data.
Once you have a Completed upload, you are all set. If you ever need to refresh a data set because, for example, you uploaded a larger date range. You can always go back to “Manage uploads” to delete older files and/or upload new ones. To view your cost data in Google Analytics, go to Acquisition > Campaigns > Cost Analysis.

View your ad performance across multiple networks in Google Analytics

Importing data (and you can enter much more than just cost data) can make it easier for you or your clients to see a variety of information from all of your paid media channels in one place.

cost data showing in google analytics

Date format
Then upload your CSV file. I personally have always used the CSV MS-DOS file type since it has never caused any issues.