Table of Contents
ToggleRunning ads outside of Google? Platforms like Facebook, LinkedIn, and Instagram are great – but there’s a catch: GA4 doesn’t track their ad spend automatically.
In this step-by-step guide, the DITS.agency team will show you how to import cost data from LinkedIn, Facebook, and other non-Google ad platforms into GA4 – so you can finally get the full picture of your advertising performance.
Key Takeaways
- GA4 doesn’t import ad costs from Facebook or LinkedIn automatically. You need to do it manually.
- Use the Cost Data import feature in GA4 Admin to upload ad spend via CSV.
- The CSV must follow a strict format with fields like date, source, medium, campaign, cost, clicks, and impressions.
- Accurate UTM tagging is essential — imported cost data must match your traffic sources.
- Start with manual uploads to test the setup before automating via API or scripts.
- Use GA4 Explore to build reports combining ad spend and user behavior.
Why Track Social Media Ad Spend in GA4?
By default, Google Analytics 4 only sees data from Google Ads. All other traffic sources – including Facebook, LinkedIn, and Instagram – require manual setup.
The good news? You can get it done in just 15–20 minutes.
Here’s what you’ll need to do:
- Add UTM tags with a utm_id parameter to your ad links
- Prepare a CSV file with daily campaign data
- Upload that file into Google Analytics 4
- Build a report and start analyzing the results
- utm_source=linkedin - the traffic source
- utm_medium=cpc - the type of traffic (e.g. paid, targeted)
- utm_campaign=article - the name of your campaign
- utm_id=linkedin_article - a unique campaign ID used for importing cost data
How to Add Ad Cost Data to Google Analytics 4
Step 1: Add the Right UTM Tags to Your Ads
For GA4 to correctly attribute your imported cost data, each ad URL must include a unique utm_id.
Example URL:
https://example.com?utm_source=linkedin&utm_medium=cpc&utm_campaign=article&utm_id=linkedin_article
What each parameter means:
!!! Important:
The utm_id must exactly match the campaign_id in your CSV file.
Without utm_id, GA4 won’t be able to link your cost data to the campaign – so make sure every final URL in your ads includes it.
Step 2: Prepare Your Ad Cost Data File
Create a table in Google Sheets or Excel with the following columns:
- campaign_id - A unique identifier for your campaign. This must match the utm_id used in your ad URLs.
- source - The advertising platform (e.g. facebook, linkedin, etc.)
- medium - The traffic channel (e.g. cpc, paid_social)
- date - The date of the data entry in the format YYYY-MM-DD (e.g. 2025-06-01).
!!! Important:
The date format must be correct — GA4 will reject the upload if it’s not.
- impressions - The number of ad impressions for that day
- clicks - The number of ad clicks for that day
- cost - The amount spent on ads for that day
!!! Important:
The currency used in your cost data must match the currency set in your GA4 property. Otherwise, the imported values may be misinterpreted or rejected.
Before creating the file, export your campaign data – including impressions, clicks, and cost – from your advertising platform (such as Facebook Ads Manager or LinkedIn Campaign Manager).
Google also provides a ready-to-use template for uploading advertising cost data into GA4. You can use it as a base and simply fill in your own campaign information.
Here’s an example of what a completed file might look like:
Make sure that:
- campaign_id matches the utm_id in your ad URLs
- date uses the YYYY-MM-DD format (required by GA4)
- Clicks, impressions, and cost are taken from your advertising platform
Then export this table as a .csv file.
Step 3: Importing Data into GA4
- Go to GA4 → Admin → Data Import
(under the “Property” column)
Choose the following:
- Name - for example, “LinkedIn Cost”
- Data type - Cost data
- Upload method - Manual CSV upload
- Select and upload your .csv file
Step 4: Map the Fields
After uploading the file, GA4 will display a mapping screen.
Here, you’ll need to match the required and optional fields from your file with the appropriate Analytics fields in GA4.Use the dropdown menus under Import field to select the column from your file that corresponds to each Analytics field.
All set? Click Import.
If everything is correct, you’ll see a green success checkmark ✅.
Step 5: View the Results of Your LinkedIn Data Import in GA4
Option 1: Use Explore
Go to Explore → Blank Report
Add the following dimensions:
- Session source / medium
- Session campaign
Add the following metrics:
- Non-Google clicks
- Non-Google impressions
- Non-Google cost
Option 2: Use the Standard Report
You can also compare the performance of different ad channels in one place.
Go to Reports → Acquisition → Non-Google Cost.
What You Gain by Importing LinkedIn Data into GA4
Importing ad cost data into GA4 allows you to:
- See the actual spend, impressions, and clicks from Facebook, LinkedIn, and other platforms
- Accurately calculate cost-per-click (CPC) and return on ad spend (ROAS/ROMI)
- Compare the performance of all your ad channels in one unified report
- Improve reporting clarity for your team and stakeholders
Bonus:
Once everything is working smoothly, you can automate the process using APIs or scripts. But we recommend starting with a manual CSV import to make sure everything is set up correctly.
If you’re planning to run ads on social platforms like Facebook, Instagram, or LinkedIn – or in search engines like Google or Bing – our team is here to help.
At DITS.agency, we don’t just launch campaigns – we focus on analytics, performance, and real ROI.
Reach out to our specialists to make your advertising actually work.

