4 Ways to Import Cost Data into Google Analytics
If you use multiple ad services and platforms to advertise your products, it’s a good idea to combine all ad data in a single interface. This brings some huge advantages:
1. Saves time. You don’t need to eternally switch between Google Ads, Facebook, Instagram, and other services to evaluate the efficiency of advertising efforts.
2. Lets you compare the performance of all services in one system. In addition to cost data, you can send additional information from ad services to Google Analytics to deeply analyze your campaigns, ads, and keywords. You can use this data to decide if your channels pay off and reallocate your budget by comparing views, ad costs, CTR, and ROAS for all traffic sources.
You can see this data in GA reports by going to Acquisition — Campaigns — Cost Analysis.
3. Lets you use additional features of Google Analytics. If you import cost data to Google Analytics, you can use it in different attribution models and compare calculation results along with ROI to properly credit your marketing channels.
These results also can be tracked in GA: Conversions — Attribution — Model Comparison Tool.
How to import cost data to Google Analytics
It’s quite easy to import cost data from Google Ads (formerly AdWords) to GA as there’s a native integration between these two services. To export cost data from other ad services, you can do one of the following:
- Manually import via the GA interface.
- Import with a special add-on for Google Sheets.
- Use semi-automatic import with the API and Google Apps Script.
- Use an out-of-the-box solution.
We’ll take a closer look at the options that don’t require any assistance from IT specialists (like the API alternative) so you can learn more about how to import cost data in GA and using out-of-the-box solutions.
Please note that all four options we’ve mentioned require proper proper UTM tags in your campaigns:
- Required: utm_source, utm_medium, utm_campaign.
- Optional: utm_term, utm_content.
Once users click on links to your site, the values from the UTM tags are sent to Google Analytics.
1. Import cost data through Google Analytics
With this method, you have to fill out a CSV file with the data from your ad service and upload it manually to Google Analytics every time you need a report. If you have two or three channels and you want the data on them every month, this manual method is fine. But when it comes to dozens of channels, it gets really complicated and time-consuming.
There are three steps to import cost data to Google Analytics.
Step 1. Create a data set in Google Analytics.
Go to the Admin panel — Data Import — Create:
Then choose Cost Data and click Continue:
Name your data set and choose the GA view to upload cost data to. Click Continue:
Now determine the data set structure by choosing the parameters to export from the ad service to Google Analytics. There are three required fields, which are filled automatically: Date, Source, and Medium. There’s also a set of fields that require at least one parameter: Clicks, Cost, and Impressions.
The third set of fields is optional. Here you can add any extra information you collect with UTMs — for instance, keywords or ad content.
Under Import Behavior, choose what you want to do when imported data is repeated, for example when keywords are already uploaded to GA. If you want to add the new data to the existing data, choose Summation. If you want the existing data to be replaced with the new data, choose Overwrite. Next, save the changes and you’ll see a new data set in the Data Import menu:
Step 2. Create a CSV file to upload.
Once you’ve created the data set, you need to prepare a CSV file, fill it with your data on cost, clicks, and other metrics from the ad service, and upload it to Google Analytics. Don’t forget to stick to the same data structure in the CSV file as in the data set from step 1. You can read more about how to properly build a file for uploading cost data in Google Analytics Help.
Step 3. Upload the CSV file to Google Analytics.
At this point, your data has been collected and the CSV file is ready. Now it’s time to send it to GA. To do that, navigate back to Data Import and click on Upload File:
Select the CSV file with the cost data on your computer and confirm the Upload:
If the CSV file was filled correctly, you’ll see that the status is Completed. It will take about 24 hours to process the data and to add it to your reports.
If you see an error when importing the data, check out possible issues and solutions in Google Analytics Help.
2. Import cost data using the Google Sheets add-on
If you already collect cost data in Google Sheets, you can avoid the hassle with CSV files. Just use the free OWOX BI Data Upload Add-on and send your cost data from Google Sheets to Google Analytics directly. If there are any mistakes in the uploaded data, the add-on will suggest how to correct them.
To import data with the OWOX BI Data Upload Add-on, you need to create a data set in GA, and download and install the add-on. Next, open a properly structured cost data table (like the data set in GA, and click on Add-ons — OWOX BI Data Upload — Upload data:
Then choose the account, web property, and data set in GA to which you would like to upload costs and click Verify & Upload.
Sweet, in 24 hours you’ll see the added data in GA reports.
3. Use the API and Apps Script to import cost data
This data import option is semi-automatic. Here’s how to set it up: create a data set in GA along with a cost data table in Google Sheets, and Google Apps Script will do the rest. Check out this guide to learn more about importing via the API.
Keep in mind the drawbacks of this option, however:
- There are tons of ready-made scripts, but you have to configure them and know the correct App Script syntax to use them.
- You’ll have to collect data in Google Sheets manually or through another API and App Script, or even using special services.
- There’s a certain format you have to stick to or else you’ll see errors or uncertainties in your data.
4. Importing cost data automatically via special services
Most Ecommerce projects use other ad platforms along with Google Ads. Therefore, these projects have to track their costs carefully to quickly react and reallocate their marketing budgets. This is why uploading data manually is surely too time-consuming. But there are tools to solve this problem and help marketers and analysts get rid of routine work. Here’s our solution for this problem, which we call OWOX BI Pipeline.
Currently, you can use BI Pipeline to automatically import data to GA from Facebook, Instagram, Criteo, Yandex.Direct, Yandex.Market, MyTarget, AdRoll, Trafmag, Bing Ads, Twitter Ads, Sklik, Outbrain, Yahoo Gemini, and Hotline.
OWOX BI can also expand shortened links, recognize dynamic parameters in ad campaigns, check UTM tags, and notify you of any mistakes in tags. And the cherry on top is that Pipeline converts the currency of the ad service you use to the one in GA.
If you need to analyze data for a previous period, you can set up a special option in OWOX BI settings to get historical data from GA for the past six months. Moreover, Pipeline retrospectively updates the data uploaded to GA (for up to 21 days) if there are any changes in the data of the ad service. Interested yet? You can try all of these features for free during the 14-day trial period.
Oh, and another cool thing is that you can still keep using 2 OWOX BI pipelines from ad services for free after the end of the trial period.
But enough about the advantages of BI Pipeline. Let’s talk about how to use it. You’ll first need a data set in GA and then set up OWOX BI Pipeline.
If you haven’t got an OWOX BI project, set it up using your Google account. Then navigate to Pipeline, create a pipeline and select the data source:
Next, provide access to the advertising service:
And provide access to your Google Analytics account:
Select the data set in Google Analytics to upload cost data:
Now set the starting date for importing data (by default, it’s the current date). You can change this to a past or future date. Now select a view and click Create:
Ta da! The pipeline is set and ready. The data will be available in GA reports in about 36 hours. It takes up to 12 hours for OWOX BI to process the data and up to 24 hours for GA to process it.
With the free Start plan, data processing by OWOX BI can take up to 36 hours.
What if I only need data on a single campaign?
You can create a CSV file with the data from this campaign and upload it manually to GA. Automatic import will only let you upload data on multiple campaigns. Though, you can set up filters to see the information on the campaign you need. To do that, choose the Campaign parameter when creating a data set in GA:
After that, go to Acquisition — Campaigns — Cost Analysis and set Campaign as the primary dimension to see a report across campaigns.
What if I need more parameters than the data import in GA allows?
If you need information that isn’t included in the cost data schema, you can collect and combine data from ad services in Google BIgQuery. OWOX BI Pipeline lets you send complete data to BigQuery from Facebook Ads (see the data schema).
How can I import cost data to GA from sources that aren’t integrated with OWOX BI Pipeline?
BI Pipeline uses the official APIs of ad services. For services that don’t provide an API or that aren’t integrated with OWOX BI, there’s a manual upload option. It’s different from the GA manual upload method as you don’t have to form and upload CSV files — you can do that in the OWOX BI interface.
How can I calculate ROAS and take into account refunds and completed orders that aren’t in GA?
You’ll have to use BigQuery to merge data about completed orders from your CRM with data from ad services and GA. This will also allow you to set up a Funnel Based attribution model and evaluate your campaigns while accounting for offline orders.
To compare the performance of your ad channels, you need to collect data in a single system like Google Analytics. The best way to import your cost data depends on how many ad services you use and how often you need reports on them.
If you use two or three ad services and don’t need reports often, you can upload cost data to GA manually. Otherwise, consider using special services like OWOX BI to automatically upload cost data.