How to Add Data to Google Analytics

Cody Schneider8 min read

Google Analytics is the default dashboard for understanding website performance, but it doesn't tell the whole story on its own. It's fantastic at tracking what happens on your site but often lacks context from your other marketing and sales tools. This article will show you how to add external data to Google Analytics to get a complete, unified view of your business performance.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Why Bother Adding More Data to Google Analytics?

Connecting external data sources to Google Analytics transforms it from a website traffic monitor into a central business intelligence hub. When you only look at GA data in isolation, you're missing critical pieces of the puzzle.

Here are a few common scenarios where adding data is a game-changer:

  • Seeing True ROI from All Ad Platforms: GA automatically imports cost data from Google Ads, but what about your ad spend on Facebook, LinkedIn, TikTok, or other channels? By importing that cost data, you can compare spend vs. revenue across every campaign, right inside GA.
  • Connecting Offline Actions to Online Behavior: What if a user browses your site, then calls your sales team to make a purchase? By default, GA has no idea that conversion happened. Importing data from your CRM or call-tracking system links that offline sale back to the original online session.
  • Understanding Lead Quality: Generating lots of form submissions is great, but which channels are bringing in leads that actually turn into qualified prospects or loyal customers? By importing data from your CRM (like Salesforce or HubSpot), you can see which campaigns drive real business value, not just vanity metrics.

Ultimately, enriching your GA data helps you make smarter decisions. You can confidently allocate budget to the channels with the best ROI and get a clear picture of your entire customer journey, from first ad click to final purchase.

The Main Methods in GA4: Data Import and the Measurement Protocol

Google Analytics 4 provides two primary ways to send external data into its system. They serve different purposes and have different levels of technical complexity.

Data Import

This is the most common and accessible method. Data Import lets you upload CSV files containing external data to join with the data GA has already collected. Think of it as adding new columns of information to your existing reports.

This is the best method for data that is updated periodically, such as:

  • Ad campaign costs, clicks, and impressions from non-Google platforms.
  • Metadata about your products, like size, color, or profit margin.
  • Information about users from your CRM, like their lead status or customer lifetime value.

The process involves formatting a CSV file according to Google's specifications and uploading it manually or automating the upload via SFTP.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Measurement Protocol

The Measurement Protocol is a more advanced, real-time method. It allows you to send data directly to Google Analytics servers from any internet-connected device, such as a point-of-sale system, a CRM, or a server-side application. It sends raw hits (like pageviews or events) programmatically.

Use this when you need to record actions that don't happen in a web browser, for instance:

  • A purchase is made in your physical store.
  • A lead’s status is updated to "Qualified" in your CRM.
  • A subscription payment is processed on your server.

Using the Measurement Protocol almost always requires help from a developer to send properly formatted data packets (HTTP requests) to Google's servers.

Step-by-Step Guide: Importing Data into Google Analytics 4

For most marketers and business owners, Data Import is the go-to method. It empowers you to enrich your reports without needing to write a single line of code. Let’s walk through the most common use case: importing cost data from a platform like Facebook Ads.

1. Importing Cost Data from Non-Google Ad Platforms

Let's say you're running campaigns on both Google Ads and Facebook Ads. In GA4, your reports will show cost and ROI from Google, but your Facebook campaigns will show $0 cost, making it impossible to evaluate their performance. Here's how to fix that.

The Goal: To apportion ad spend, clicks, and impressions from a Facebook Ads campaign to the corresponding traffic in Google Analytics.

Step 1: Tag Your URLs with UTM Parameters

Before you can import anything, you need to ensure GA can match the cost data to the right sessions. The only way it can do this is through UTM parameters. Your Facebook Ad destination URLs must be tagged properly.

  • utm_source: Identifies the advertising platform (e.g., facebook).
  • utm_medium: Identifies the medium (e.g., cpc or social).
  • utm_campaign: The name of your campaign (e.g., fall-sale-2023).

The values you have here need to line up exactly with the data you'll upload in your CSV file.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 2: Create a New Data Source in GA4

  1. Navigate to the Admin section of your GA4 property (the gear icon on the bottom left).
  2. Under the "Property" column, click on Data Import.
  3. Click the Create data source button.
  4. Give your data source a name, like "Facebook Ads Cost Data."
  5. For the data type, select Cost data.
  6. Click next to proceed to the mapping configuration.

Step 3: Map Your Data Fields and Create the CSV

Google will now ask you how the columns in your future CSV file should be mapped to GA4 dimensions and metrics. You need at least one date dimension and one cost metric, plus campaign source dimensions.

GA4 provides a template for you. A typical setup looks like this:

  • campaign_id
  • ad_set_id
  • ad_id
  • date (required, format YYYY-MM-DD)
  • clicks
  • cost (required)
  • impressions
  • source (required, e.g., 'facebook')
  • medium (required, e.g., 'cpc')

Your task is to create a CSV file with these exact column headers. You'll need to export your performance data from Facebook Ads Manager and then reformat it in Excel or Google Sheets to match this structure.

Here’s what your final CSV file might look like:

date,source,medium,campaign_name,cost,clicks,impressions
2023-10-26,facebook,cpc,Fall-Sale,50.25,112,5432
2023-10-26,linkedin,cpc,B2B-Webinar,75.00,55,3210
2023-10-27,facebook,cpc,Fall-Sale,55.70,130,5890
2023-10-27,linkedin,cpc,B2B-Webinar,82.40,65,3891

Step 4: Upload Your File

Once your file is ready, go back to the Data Import screen in GA4.

  1. Find the data source you created.
  2. Click the Import now link on the right.
  3. Select your prepared CSV file and upload it.

After a short processing time (up to 24 hours), GA will populate the cost, clicks, and impressions data into its reports. You can then navigate to Reports > Acquisition > Non-Google cost to analyze performance and ROI.

2. Importing CRM or Offline Data

You can use a similar process to upload data about your users. For example, you could import a "Lead Status" from Salesforce to see which campaigns produce Marketing Qualified Leads (MQLs).

To do this, you'd need:

  1. To capture the User ID or Client ID from Google Analytics and store it in your CRM for each user. This requires some initial site configuration.
  2. Create a custom dimension in GA4 named "Lead Status."
  3. Create a new Data Source in GA4 for User data and map the fields. Your CSV would have two columns: one for the User ID (e.g., ga.userId) and one for your custom dimension ("Lead Status").
  4. Export the relevant data from your CRM, format the CSV, and upload it.

Once imported, you'll be able to use "Lead Status" as a secondary dimension in your acquisition reports, revealing which marketing efforts are truly effective.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

The Hidden Cost: Manual Report-Building

As you can see, Data Import is a powerful feature, but it comes with a significant catch: it's a completely manual process. Every Monday morning, someone on your team has to go into Facebook Ads, LinkedIn Ads, or your other platforms, download the latest data, wrangle it in a spreadsheet to match Google's format, and then upload it. If there are formatting errors, the upload fails, and you're stuck troubleshooting.

By the time you get last week's cost data into GA on a Tuesday, your team is already behind. You're making decisions based on old information, and half your week is gone just getting the data prepared. This constant cycle of exporting CSVs and stitching reports together is tedious, error-prone, and a massive time drain - time that could be better spent on strategy and execution.

Final Thoughts

Enriching your Google Analytics data with external information like multi-channel ad costs and CRM data gives you a far more accurate and complete view of marketing performance. Using native features like Data Import, you can manually bridge the gap between platforms and unlock deeper insights about what truly drives business growth.

While an improvement over siloed reports, the repetitive, manual work of downloading and formatting CSVs is exactly the kind of friction we created Graphed to eliminate. Instead of spending hours each week preparing files, we allow you to connect all your data sources — like Google Analytics, Facebook Ads, Shopify, and Salesforce — with a few clicks. This gives you a real-time, unified dashboard instantly, so you can spend your time getting answers and making decisions, not building reports.

Related Articles