Data Import Step-by-Step Guide for Google Analytics



Data Import is a feature that helps you combine data inside of Google Analytics with data you that you have outside of Google Analytics. Ideally, you’ll be able to use more personalized information inside of Google Analytics to help find meaningful and actionable insights. Not sure yet? Here’s an example:

By default, Google Analytics can tell us certain information about the pages people view on our site:

  • page path (including query parameters)
  • subdirectory levels
  • title
  • hostname

But what if we have additional information about our pages we want to see in Google Analytics? For example, a content site may have a lot of interesting meta information about its pages:

  • author
  • content type
  • content tone
  • publish date
  • publish hour
  • publish day
  • publish week
  • publish month
  • publish year
  • section
  • sub-section
  • headline
  • sub-headline
  • article category
  • number of images
  • number of videos
  • character count
  • word count

Data Import lets us add all the additional information we have about our pages, so we can segment the data in many interesting ways. Wouldn’t you like to know if pages with more images lead to a higher conversion rate on your site? Perhaps which categories or authors drive the most traffic?

More ideas and examples: 17 Ways to Revolutionize Your Reports with Data Import 

Enough theory, just show me how to do it!

Below are the step-by-step instructions for data import.

1. Create custom dimensions

Because you’re adding data into Google Analytics, it needs somewhere to live. Primarily, this will be stored as a custom dimension (although you could also use custom metrics).

So before we start uploading data into GA, we need to create the custom dimensions first.

If you’ve never created a custom dimension before, follow our instructions for creating and editing custom dimensions and metrics.

2. Create the Data Set

A Data Set is a container that holds the data you upload to GA. It also defines the schema for the data import. 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. For example, you might use the Page dimension (which already exists in GA) to join additional information you have about the page (author, word count, etc.).


To create a Data Set, navigate to the Admin area of GA. In the middle column (Web Property settings), look down toward the bottom and click on the Data Import menu. From the Data Import screen, click on the button to create a new Data Set.


Next, choose the Data Set type. There are 8 options:

Choose the appropriate type according to the data you’re uploading, then click to the next step. For help in understanding the different options for the Data Set types, explore the linked help center articles from Google.

Next, give the Data Set a name and choose which Views this additional data will be available.

Data Set Details

Next, you need to define the Data Set schema. This is just the key (the data that exists in GA and in the uploaded data) and the dimensions where the uploaded data will be stored. For the key, you’ll select from a list of dimensions in the dropdown. These can be standard dimensions in GA (like Page) and/or custom dimensions. The dimensions listed will be different depending on the Data Set type you chose.


Using our example from above, our final schema may look like the following:

Data Import

You’ll have an option to control how the uploaded data gets joined with the existing data in the Overwrite hit data / Import Behavior section. For example, you can specify whether or not the data that you’re uploading should overwrite data values that are collected as part of the hit. In other words, if you’re passing in the author name from your Google Analytics tracking on your site, do you want to use the value that is on the hit, or overwrite it with your uploaded value?

The options for Cost Data import are slightly different. You can choose whether duplicate data is added (summed) to previously uploaded data, or if it should overwrite previously uploaded data.

Data Import Overwrite Options

Once you’ve chosen these options, click Save. Now you’ll see two buttons – Get schema and Get Custom Data Source ID (for API users).

Click on the Get schema button.

This gives you the CSV header to use as the first line in your uploaded CSV file. Alternatively, you can also download an Excel template that you can fill with your data.

Data Import Schema

3. Create the CSV

Using either the CSV header or the downloaded Excel template, you can now build the file that you will upload. Using our example (and the Excel template option), you would have a file that looks like below:

CSV file for data import

If you’re using an Excel file, save it as a CSV after you’ve added your data.

4. Upload the Data

Once you have your CSV file with your additional data, there are two options for uploading it. You can use the Google Analytics Management API to upload data, or you can upload it manually. For our example, let’s keep it simple and manually upload our file.

If you have data that changes frequently, like new product information or new articles published, you may want to consider a more technical solution to automatically update each night.

First, from the Data Import screen in the Admin, click the Manage uploads link next to the Data Set into which you want to upload data.


Then, click on the Upload file button, choose the CSV file you created earlier, and upload it.

It’s that simple!

5. View data in reports

Uploaded data only gets added to your data during the processing stage. This means it will not be applied retroactively (Google would have to reprocess all your historic data, and that’s not going to happen). It will only be applied to hits as they’re being received. Also, it may take up to 24 hours before the data shows up in your reports.

Once you’ve uploaded your data and it has started processing, you’ll be able to see the uploaded data in your reports in a number of ways. Since your uploaded data is being stored in custom dimensions, you’ll be able to view it in all the same ways (secondary dimensions, custom reports, custom dashboards). For more information on how to access these values, check out How to Report Custom Dimensions in Google Analytics.

Things to keep in mind

There are several other nuances and FAQs of Data Import that are common. Here are the top ones:

  • You need edit permissions at Web Property level to configure Data Import  and Custom Dimensions.
  • A good use case for data import is when you don’t want the data out in the open (viewable in the source code or by looking at the collect request). For example, you may want to see gross margin in GA for you analysis. This isn’t something you’d want to send along with the pageview hit, which is easy to see.
  • Data Import does not apply to historic data. There is an option for Google Analytics 360, called Query Time import, which  does join your uploaded data to historical data (with some limitations).

Additional resources

Jim Gianoglio is a Manager for the Analytics & Insight department. He works with implementation, analysis and training of Google Analytics and Google Tag Manager. Before focusing on analytics, he led the SEO campaigns of Fortune 500 companies in the insurance, retail and CPG industries. Things you didn’t know about Jim: he’s biked from Pittsburgh to Washington DC in 41 hours, roasts coffee beans and has done voiceovers for TV commercials.

  • Vishal B Iyer

    Nice Article. Thanks Jim.

    I have a query. We upload Cost data on Google Analytics each month. Now, there is a need to overwrite the cost data for previous month with correct figures (Unfortunately, we uploaded wrong figures all these months)

    Is it possible to overwrite for previous months? If Yes, How long will it take to reflect on Google Analytics?



    • Jim Gianoglio

      You can overwrite previously uploaded data by using the Overwrite option in the Import Behavior field. So in your example, you could update your CSV file to change the values of the imported data (cost, clicks, impressions, etc.). As long as the keys (date, medium, and source) remain the same, it will overwrite existing rows of data with the same keys.

      You should see the change in your reports within 24 hours.

  • Pankaj Kaushik

    Hi Jim- I made a custom dimension based on page title but i am receiving something like this and not the author name against page title, please suggest what could be the error

    • Jim Gianoglio

      Hi Pankaj –

      Check your csv file – make sure it looks like the example in Step 3. It looks like maybe “ga:dimension1” got listed as a value that you’re uploading (it should only be in the first row/header of your uploaded file).

  • John

    Hi, great post, it is very useful!

    I have a question. I have created a few custom dimensions and metrics and uploaded them to GA without a problem (using page as the key). However I want to add an extra dimension which already exists in analytics (Hour of day) ga:dateHour. I haven’t found a way to insert it directly in to the Data Set Schema with the data import panel.

    Thus, I have tired inserting the dimension code straight in the CVS data set I downloaded, but when I fill in the information and upload it, I get an error. This is because Analytics doesn’t identify ga:dateHour in the Data Set Schema.

    Any thoughts on how i can insert ga:dateHour without getting an error?

    Thank you!

    • Jim Gianoglio

      Hi John,

      Unfortunately, date and time dimensions are not available for data import. If you want to import information like ga:dateHour, you can create a custom dimension and use that in your data import schema.

  • Rachel

    Thanks so much for this article! Do you know if it’s possible to automate the data import to be done on a daily basis? We’d like to upload daily cost data for previous day. Thanks again.

  • ACMG MCC Jim,
    I am having some very weird results. I created a data set and imported data yesterday. My key was cost and i updated date, cost, source, medium. Today I made another data set and as i wanted to add impressions. I chose the overwrite option but it won’t work. On the summary screen it has nothing for import behavior. Then I edited it and changed to summation to see what would happen and now it has both and it has summed my data about 4 times. Any idea what’s going on and how I can zero that out or upload the right data?

    • Jim Gianoglio

      Hi Jared –

      I’m not sure exactly why you’re seeing the summation behavior you’re describing, but you may want to read through this help center article:

      Although you can’t “delete” a data set, you should delete the uploaded files within the first data set to avoid any potential issues with duplicate records.

      • ACMG MCC

        I think my issues stems from the same keys being uploaded in different data sets – “If you import to the same target dimensions or metrics from keys in different data sets, the imported values used will be uncertain. This is because Analytics uses parallel processing and takes the first match it finds.” I deleted all import files but as you said I can’t delete a data set. Any suggestions? I can try and upload the same keys with 0’s in all the fields in all the data sets and see if that does anything.

      • ACMG MCC

        You’re awesome. I simply deleted all the import files and it seems to have fixed it. It’s basically as if the data was never there. Thanks.

Contact Us.

Follow Us



We'll get back to you
in ONE business day.
Our Locations
THE FOUNDRY [map] LunaMetrics

24 S. 18th Street
Suite 100

Pittsburgh, PA 15203


4115 N. Ravenswood
Suite 101
Chicago, IL 60613


2100 Manchester Rd.
Building C, Suite 1750
Wheaton, IL 60187