Export Hit Level Google Analytics Data to Amazon S3

Sumit Mudliar
Electrik.AI
Published in
4 min readJul 16, 2020

What is Google Analytics?

Google Analytics (GA) is a free tool provided by Google to capture visitor insights from your website. It can track the source of the visitor, pages visited and other activities. If you have setup your GA script on your website, then it sends information to Google Analytics.

What is Amazon S3?

Amazon Simple Storage Service (Amazon S3) facilitates storage and retrieval of any amount of data at any time, from anywhere on the web. It is accomplished with web interface of the AWS Management Console. Amazon S3 uses the same scalable storage infrastructure that Amazon.com uses to run its global e-commerce network.

How to Export Hit Level Google Analytics Data?

Exporting raw hit-level data out of Google Analytics is very tricky because Google Analytics only makes aggregated data available from the API. Effectively, we end up downloading a Google Analytics report with each request. While we could find out the number of visitors in a particular segment on a particular day on our website and fetch a variety of metrics for those users (such as source/medium, browser, or session duration), we couldn’t get at the underlying, user-level data to follow an individual user’s journey.

Even the Premium version of Google Analytics also known as Google Analytics 360 does not give you the option to export Google Analytics Data to Amazon S3, You can try building your own solution but then you should be an expert in Google Analytics API, Transforming data received in JSON from Google Analytics to CSV files and upload them to Amazon S3 and this is just the beginning, you must keep in mind that technologies like Google Analytics are evolving and you might find what was working yesterday might not work today. Trust me we have been following this space closely.

And so far we have just scratched the surface on how you can extract raw data from Google Analytics. It gets even more complicated when you integrate data from different marketing sources with Google Analytics. So instead of building and maintain your own solution or paying $150,000 for Google Analytics 360.

Enter Electrik.AI !!!

Electrik.AI’s Google Analytics Hit Level Data Extractor, exports raw un-sampled hit-level data from Google Analytics to Amazon S3 in just three easy steps.

Step 1: Setup your Google Analytics Account.

Step 2: Setup your Amazon S3 account.

Step 3: Create a data flow to Export Hit Level Google Analytics data to Amazon S3.

Your Google Analytics hit level data for each day will be exported to Amazon S3 after 24 hours.

Here is a sample of hit-level data exported from Google Analytics by Electrik.AI’s Google Analytics Hit-Level Data Extractor.

You can view a list of all dimensions/metrics extracted from Google Analytics here.

Electrik.AI’s Google Analytics Hit Data Extractor, uses Google Analytics to track raw hit level data on your website and exports Google Analytics Data to Google Big Query or any Database of your choice. Along with raw un-sampled Hit Level Data you also get the following in your data exported from Google Analytics.

  1. Hashed IP Address of the Visitor on your website.
  2. Unique Visitor ID for each user on your website.
  3. Unique Session ID for each period a user is active on your site.
  4. Client ID created and assigned by the Google Analytics cookie.
  5. Order of Pages viewed by a user in a session.

--

--

Sumit Mudliar
Electrik.AI

Transforming ideas into reality through code. Driven by purpose, fueled by curiosity. Always learning and growing.