Google Analytics 4 (GA4) Data Import Feature

August 10, 2021
Senior Analytics Engineer

If your organization is looking to integrate operational, offline, or first-party data with your Google Analytics (GA) data, look no further than the Data Import feature. Google's Data Import lets companies upload data from external sources and join it with Analytics data to analyze a single body of information about their business. In doing so, companies can add additional, previously unavailable, or outdated metadata to hits that have already been collected and processed by Google Analytics 4 (GA4).

Data Import Overview

 

Typically, the information stored in custom dimensions, metrics, or events is considered static; you may, in some cases, want to overwrite the default information previously gathered or add entirely new event data that didn’t exist in GA. Some examples include:

  • Leads generated at a trade show
  • In-store visits and offline sales
  • Online product catalog updates to categories, variants, names, etc.
  • CRM/CMS user data can be merged with GA user data

Where Is It Located In Your Google Analytics 4 Property?

The Data Import feature is located in the Admin > Property > Data Import section in your GA4 Property: 

Accessing Data Import in GA4 Admin Section

Creating a Data Source

After finding the Data Import feature; click the "Create data source" button and select the type of data you will be importing:

Click the “Create data source” button

 

The Data Source will act as a container holding the data you upload to GA. It will also define the schema for the data import. Depending on the Data Type (discussed below), the schema boils down to two important things:

  • Key
  • Location for uploaded data

The key is a dimension on which you will join the data that already exists in GA with the data that you're uploading. 

So let's select the Data Type you want to import and upload your CSV file:

Select the Data Type you want to import
Data Type Options

Google Analytics allows for different available dimensions that can be applied to:

  • Enhance your existing commerce product data.
  • Generate new insights that link separate platforms using Client/User ID.
  • Combine offline events with online data (e.g., offline sales and store visits vs. online sales and site traffic).

All these methods help you get a holistic view of your organization's effort.

It is very important to make sure to format the CSV as specified by Google for each data type or your upload will fail! The schema requires a strict key/value pair that correspond to existing dimensions and metrics from GA. In the process of importing data, if GA recognizes a match, it adds (or replaces if data was already collected) the dimension and metric values associated with that key to that data.

To avoid this pitfall, I'll link to Google’s import template for each Data Type below!

Item Data

Item Data Template

This allows you to upload your offline or recently-updated product catalog to backfill missing or undefined product-related dimensions in your GA4 Enhanced Ecommerce implementation.

Requires: Item ID (Product ID or SKU)

Additional Dimensions:

  • Item name
  • Item category
  • Item category (2-5)
  • Item brand
  • Item variant
User Data

User Data Template

User data can be imported from your own CMS or CRM to enhance online metrics/reporting with offline data to view the full picture. Think remarketing audiences here, folks!

Requires: Client ID+Stream ID or User ID

Additional Dimensions:

  • user_property1
  • user_property2
  • etc…
Offline Event Data 

Offline Event Data Template

This allows you to import events from sources that don't have an internet connection or that don't support real-time event collection using SDKs or the Measurement Protocol. This could be event data like physical store visits or actual offline sales data. Don't use any of these reserved names, though, otherwise, GA will reject the hit!

Requires at least one of the following:

  • event_name
  • Either client_id or app_instance_id (web or mobile)
  • Either measurement_id or firebase_app_id (GA4 or Firebase)
  • Either measurement_id and client_id (GA4) or firebase_app_id and app_instance_id (Firebase)

Additional Dimensions (optional):

  • timestamp_micros - the timestamp must be within 24 hours of event or timestamp of upload if none is provided
  • user_id
  • event_param.[your_event_param]
  • user_property.[your_user_prop]
  • item[x].[item_param] (eg: item2.blue_hat)
Success!

If configured properly, GA will give you that glorious green check mark letting you know your Import is safely in its cozy new GA4 home.
 

Data source successfully added in the GA4 interface

Gain Great Insight Into Your Digital & Offline Environments

Data Import is a powerful tool that can help you gain greater insight into your digital and offline environment through combined datasets. Applying these insights in your decision-making process is going to be key though. So, create that new Audience and use it to optimize your Google Ads or find a new present last month’s Online and Offline Sales numbers in a snazzy Data Studio dashboard—the possibilities are very exciting.

If you’re looking for supplemental Google Analytics 4 content we recommend checking out our whitepaper, attending one of our upcoming GA4 trainings, and browsing our additional Google Analytics 4 resources.