How to import your data into Google Analytics


In their constant quest for better performance, online retailers have developed genuine e-commerce ecosystems for themselves. However, faced with the continually increasing amount of marketing tools available, having them all in one place makes more sense to allow for a more in-depth analysis of activity. That’s where the Data Import feature in Google Analytics comes in.


Using this feature you can import data from external sources (CRM, inventory management tools, etc) and combine it with the data collected in Google Analytics itself. The imported data can then be used to help develop your reports, your segments, and even your remarketing audience. With its help, you get a comprehensive view of your customers’ activity both on and off line.

What kind of data can be imported into Google Analytics?

Google recognises three different kinds of data: Hit-data, Extended-data, and Summary-data.

To start with, you can import refund data into the tool including the product’s price, the amount refunded, and the profit turned. Integrating (total or partial) refunds that you could make on orders into Analytics allows you to obtain a more detailed overview of your activity.

To get a better understanding of the visitors on your site user data allows you to import information such as the date of a user’s last purchase, their interests, their loyalty rating, and their customer value.

For product data, you can transfer information from your product catalogue straight to Google Analytics including the brand, category, size, colour, price, etc.  As such, you can evaluate your customer’s buying process, the traffic on your site, your conversions, and the income generated.

Campaign data lets you reuse your preexisting (non-google) campaign codes, to get a more personalised analysis of your publicity campaigns’ performances. “Source” and “Medium” are examples of information you can import.

Cost data lets you analyse your campaigns’ performances and get an overall view of your spending. This includes impression, clicks and costs from (non-google) ad networks.

Using information from your CMS, you can import content data into Analytics to benefit from more complete information on each of your site’s pages (author, publication date, category) and identify what content is most read.

To go even further, you can also segment your data by geographical region; city, country, or continent. And finally, you can import any kind of custom data you have into the tool.


How to import your data into Google Analytics

This step consists in importing files containing external data into Google Analytics.

The data imported into Google usually comes from offline business tools (CRM or CMS systems). If you want to use smaller amounts of data, you can either create a direct import from your (CRM) management tool or manually import it with the help of a text editor or a spreadsheet.

When it comes to data importation, you have two options. Either you log on to Google Analytics, then click on ‘Admin’ > ‘Property’ > ‘Data Import’, or you can use the Analytics Management API to carry out this step.

The imported data will be matched using a key located in, for example, your spreadsheet and in Google Analytics (SKU, URL, etc).

By importing your data into Google Analytics, you can add extra information without having to rewrite code. Plus, this avoids slowing down your loading times with more lines of code.

3 data import examples

Refund Data

Importing refund data is done with the ‘Transaction ID’ key that must be put into your import file. For total refunds, you only need to include this ID, however, for partial refunds, you need to include the transaction ID, the Product SKU, and the Quantity Refunded.

Note: Total and partial refunds must be separated into 2 files.

Schema Example

Key: Transaction ID

Dimension: Product SKU

Metrics: Products Price, Quantity Refunded, Revenue

Once imported, your refund data will be accessible in your Sales Performance Report.

Product Data

If you want to know more about which sizes and colours are most popular with your customers, here is how to import your product data into Google Analytics.

Schema Example

Key: Product Code

Imported Data:

> Choice field: product range

Google Shopping, brand, category (advanced ecommerce features), product variety.


Choice statistic: product range

Cost Data

To import cost data, you need to gather together the data generated by campaigns not done on Google (keywords on search engines, email campaigns, advertising on social media, etc). This data is then combined with revenue and conversion data to obtain stats for each campaign, keyword, ad, etc, and to analyse the performance of marketing strategies in place.

‘Medium’ and ‘Source’ dimensions are obligatory, as well as at least one of the ‘clicks’, ‘cost’, or ‘impressions’ dimensions.

You will then be able to download the following elements: ad content, groups of ads, advertising space, position, AdWords, Campaign IDs, AdWord criteria IDs, Campaigns, destination URLs, published URLs, Keywords, queries with replies, and Referral Paths.

It is also possible to link your AdWords and Google Analytics Accounts, so your AdWords data is automatically uploaded into Analytics.

Elizabeth Norton

Your e-commerce library

4 Top Tips for Selling on Marketplaces (Home and Garden)

Learn more

Marketplace Horror Stories

Learn more

Master Intelligent Google Campaigns

Learn more

Sign up for our newsletter

By submitting this form you authorize Lengow to process your data for the purpose of sending you Lengow newsletters . You have the right to access, rectify and delete this data, to oppose its processing, to limit its use, to render it portable and to define the guidelines relating to its fate in the event of death. You can exercise these rights at any time by writing to