✓ 100% independent
New Metrics

Knowledge base article

Report on ROAS in GA4: How to import your cost data

In Google Analytics 4 (GA4)3 minutes reading time

Report on CPC & ROAS in GA4? Yes, you can. Are you looking to analyse metrics like ROAS in GA4? Want to gain deeper insights into the efficiency of your ad campaigns? Google Analytics 4 allows you to import cost data, so you can track your advertising spend alongside your website traffic. Google now calls this “campaign data import”. Let’s have a look at how to do it.

What can you import into Google Analytics 4?

Apart from implementing the GA4 tracking code on your website or app, or implementing the GA4 Measurement Protocol in your microwave (yes, you could do that), there are more ways to ingest data into it.

You can create (scheduled) imports for all kinds of data, namely user data by user ID or client ID, item data, event data, custom event data and yes, campaign data, which holds your cost, clicks and impressions. As you have already noticed, in this article we will look at the latter.

GA4 data import options

What are the benefits of importing cost data into GA4?

Firstly, it allows for more accurate ROI calculations. By knowing exactly how much you’re spending on advertising, you can calculate the return on investment more accurately, making it easier to make informed decisions about where to allocate your marketing budget.

Secondly, it enables a more in-depth analysis of your advertising campaigns. With cost data, GA4 calculates metrics like non-Google cost per click and return on non-Google ad spend per campaign, source and medium. That tells you which campaigns are driving the most traffic and generating the highest revenue.

How to import cost data into GA4?

First, you don’t need to import anything for Google’s own ad platforms. Once you link Google Ads, Search Ads 360 or Display & Video 360 to your property, their cost, clicks and ROAS show up in GA4 automatically, in the Advertising section. The import is for everything else: Meta, TikTok, Microsoft Ads, LinkedIn and so on. You can import your (ad) cost data into GA4 in 2 ways: with a direct connector for Meta, Pinterest, Reddit, Snap or TikTok, or with a file or database source (a manual CSV upload, SFTP, Google Sheets, BigQuery, Google Cloud Storage, Amazon S3, Snowflake and a few more). The connectors are the easiest. They pull data daily and attempt to load 24 months of history. Let’s have a look at the manual import.

  1. Go to Admin > Data collection and modification > Data import
  2. Create import source > Campaign data
  3. Choose an import source (manual CSV upload, SFTP or one of the supported sources)
  4. Check the required fields and format in this Google help article

To import cost data, GA4 needs to link the ad cost to the sessions in GA4. It does this with your UTM parameters. The join keys are utm_source, utm_medium and the date. Campaign ID (utm_id) and campaign name (utm_campaign) are optional, but Google highly recommends them.

  1. Update all UTMs to make them match and add the UTM ID. Use one consistent source and medium per platform. The direct connectors require this.
  2. Export your data from Microsoft Ads, LinkedIn or any other platform. You need a date (YYYY-MM-DD), source, medium and at least one of cost, clicks or impressions. If you include cost, add a currency code.
  3. Check the help article to make sure the formatting is correct.
  4. Now you need to map the analytics fields to the import fields. As you can see in the screenshot below, once you have created the data source, you cannot edit the mappings.
GA4 data import fields

That’s it. It can take up to 24 hours before the data shows up in your reports, so be patient. Once it’s done, come back to it and check all the fields. You’ll find the results under Reports > Acquisition > Non Google campaign, and in the Advertising section under Planning > All channels. The campaign data import validation report (Reports > Data import) compares the imported cost, clicks and impressions with your ad platforms.

Import your data from many different sources. Google has export instructions for LinkedIn, Meta, Microsoft, Pinterest, Snap, Reddit and X in this help article.

Heads up: avoid overlapping data. If you already imported Meta costs by CSV and switch to the Meta connector, delete the old dataset first, or you will count the costs twice. All import sources together can hold 1 GB, with up to 120 uploads per property per day.

You can update the data regularly for central cost reporting. When you upload new data for the same keys, GA4 overwrites the old values and uses the most recent ones.

The takeaway

Importing cost data into Google Analytics 4 is great if you want more insight into advertising performance. It allows for more accurate ROI calculations and more in-depth analysis of your campaigns, so you can make informed decisions about your marketing budget and ultimately drive more revenue. For Meta, TikTok and a few others, the direct connectors save you the manual exports. Try it out for yourself!

Continue learning

Freek KampenIvo Taris

Need an answer for your own setup?

Questions about your tracking, GA4 or which tool fits? Ask Freek and Ivo, the analytics specialists behind New Metrics. You get a reply from one of us, not a bot.

Contact us