How to Import Product Category Data into GA4

Using our Server-Side Integration, but also want Product Category data in GA4? Follow this guide to configure it!

The Challenge:

Order data in Shopify doesn't have Product Category populated, so our GA Server-Side Integration isn't able to send Product Category data.

The Solution:

But don't worry! You can import your Shopify Product Type data into GA4 to have Product Category populate. Here's how:

Step 1: Create a Spreadsheet of Product Type & SKU Data

First, we'll need to create an Excel Spreadsheet to import. We'll need two columns of data: Product Type & SKU.

We'll start by downloading our pre-built Product Type Data Import Template below and then populate the template with your Shopify SKU & Product Type data.

  1. Download our pre-built Product Type Data Import Template here as a CSV.

  2. Next, you can easily export your product data from Shopify's Product Admin. Log into Shopify > Products. Select _Export _to export all your product information.


  3. Shopify will include a lot of data in this export. You can delete all the data except the Product Type and SKU columns.

🚧

Note: Check the Product Type column & ensure you aren't missing any categories for your SKUs!

Also, please make sure that you are sending the SKU as the product ID to your GA4 property, in case this is different, please make sure to look for the appropriate IDs in this file.

  1. Copy your Shopify SKU data into the item_id column. Copy your Product Type data into the item_cat1 column. It should look similar to the below:

  1. Don't forget to save your changes!

Step 2: Create Your Data Import in Google Analytics

  1. Log into your Google Analytics Account > Go to your GA4 property > select Admin > then Data Import

  1. Click on Create Data Source

  1. Add a Data Source Name > Select Item Data > Click on Upload CSV > Click on Next

  1. For the Mapping > Select "item_id" for the "Id" field > Select "item_cat1" for the "Category 1" field > Click on Import

🚧

If the Data Import doesn't work and it shows a Status message of 'Unknown'. please make sure that you do this from your Chrome browser while being logged into Chrome with the same account that you use for Google Analytics!

  1. Once imported, the data will be processing for a bit a finally, you should see a message similar to the one below:

FAQs:

  • What type of maintenance is required? - Minimal maintenance is required! This Data Import will populate the Product Category for the SKUs in your spreadsheet moving forward. If you add a new SKU, you'll need to upload an updated file.
  • Does this data import apply retroactively?
    Item-data import maps item_ids in historically and ongoing collected events to the item-field values you import, and processes and displays the uploaded values (in audiences, reports, and explorations) instead of the originally collected values.