Dits Agency

  • Home
  • »
  • Articles
  • »
  • How to Import LinkedIn or Facebook Ad Cost Data into Google Analytics 4

How to Import LinkedIn or Facebook Ad Cost Data into Google Analytics 4

Blog

Running 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.

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:

How to Add Ad Cost Data to Google Analytics 4

  1. 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:

!!! Important:

The date format must be correct — GA4 will reject the upload if it’s not.

!!! 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:

Then export this table as a .csv file.

Step 3: Importing Data into GA4

  1. Go to GA4 → Admin → Data Import
    (under the “Property” column)

Choose the following:

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:

Add the following metrics:

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:

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.

You may also be interested in