Connect Google Analytics to Looker: 2 Easy Methods

on BI Tool, Data Integration, Tutorials, Uncategorized • July 30th, 2020 • Write for Hevo

The process of capturing and analyzing data is a challenge to every organization. Every untracked piece of data is a lost insight that could have helped an organization be one step ahead of its competitors. Tableau is a great tool for understanding and extracting hidden information from data belonging to different sources such as Google Analytics, a comprehensive data analytics tool.

This article is aimed at providing a step-by-step guide on how to connect Google Analytics to Looker.

Table of Contents

Introduction to Google Analytics

Google Analytics is a web analytics service that provides users with statistical and analytical information. It is highly useful & helps in managing search engine optimization (SEO) and product marketing operations. It is free of cost service available to every Google user.

It visualizes data using its interactive features such as dashboard, motion charts, and scorecards to display real-time changes in data. Using Google Analytics, you can generate a custom report that meets your business requirements.

For further information on Google Analytics, you can check the official site here.

Introduction to Looker

Looker is a cloud-based business intelligence tool that lets you analyze data in real-time. It helps you understand the customer trends, metrics and how your product is performing in the market.

Rich-visualizations such as charts, graphs, etc, can be created using its interactive dashboard. Using Looker’s data modelling language, you can define performance metrics and get an insight into the relationship between various data sets.

For further information on Looker, you can check the official site here.

Get started with your data analysis with Hevo’s No-code Data Pipelines

Hevo Data, a No-code Data Pipeline helps to load data from Google Analytics along with multiple sources to your desired data warehouse and visualize it in Looker. Hevo is fully-managed and completely automates the process of not only exporting data from your desired source but also enriching the data and transforming it into an analysis-ready form without having to write a single line of code. Its fault-tolerant architecture ensures that the data is handled in a secure, consistent manner with zero data loss.

It provides a consistent & reliable solution to manage data in real-time and always have analysis-ready data in your desired destination. It allows you to focus on key business needs and perform insightful analysis using BI tools such as Looker and many more. 

Key features of Hevo:

  • Schema Management: Hevo takes away the tedious task of schema management & automatically detects schema of incoming data and maps it to the destination schema.
  • Secure: Hevo has a fault-tolerant architecture that ensures that the data is handled in a secure, consistent manner with zero data loss.
  • Data Transformation: It provides a simple interface to perfect, modify, and enrich the data you want to transfer.  
  • Completely Managed Platform: Hevo is fully managed. You need not invest time and effort to maintain or monitor the infrastructure involved in executing codes.
  • Real-Time Data Transfer: Hevo with its strong integration with 100+ sources, allows you to transfer data quickly & efficiently. This ensures efficient utilization of bandwidth on both ends.
  • Simplicity: Using Hevo is easy and intuitive, ensuring that your data is exported in just a few clicks. 

Simplify your data analysis with Hevo today! Sign up here for a 14-day free trial!

Prerequisites

  • Working knowledge of Looker.
  • A looker account with admin privileges.
  • Working knowledge of Google Analytics.
  • A Google Analytics account.
  • PostgreSQL instance with admin privileges.

Methods to connect Google Analytics to Looker

There are multiple ways in which you can connect Google Analytics to Looker:

Method 1: Using BigQuery transfer service

Google Analytics supports loading data to Looker via Bigquery for further analysis. Google Analytics 360 and BigQuery, are both Google products and hence, Google provides a data migration solution to transfer your data from one product to another. This is known as the BigQuery Data Transfer Service. In this method, you will first load your Google Analytics data into the BigQuery data warehouse and then connect it to Looker.

But this comes with a caveat. It is only available for premium users who can afford to pay thousands of dollars per year. In case you are a GA360, premium users, you can use the following steps to connect Google Analytics to Looker:

Step 1: Connecting Google Analytics to BigQuery

Use BigQuery Data Transfer service to move your data from Google Analytics to BigQuery. You can check out our easy step-by-step guide to help you load your Google Analytics data. You can schedule the data transfer to occur for a defined frequency as per your business’s data needs.

Step 2: Loading data from BigQuery to Looker

Once you’ve successfully transferred your Google Analytics data into BigQuery, you can now connect BigQuery to Looker to start analyzing your data. Check out our detailed and easy guide to help you connect BigQuery to Looker using Lookers’ connection settings.   

Limitations of this method

  • This method requires you to have the Google Analytics 360 privileged access, which comes at a very hefty price. Most small business would find this method economically difficult for them to implement.
  • There is very less scope of customization in the BigQuery Data Transfer service.

Method 2: Using PostgreSQL as an intermediate database

You can use Google Analytics Reporting APIs to fetch data and then store it in PostgreSQL. Now connect your PostgreSQL database to Looker to start analyzing your data. You can implement this using the following steps:

Step 1: Connecting Google Analytics to PostgreSQL

Google Analytics makes its data available through the Google Reporting API V4. The API can be accessed by authenticating the OAuth protocol. You can check our detailed guide, to help you load data into PostgreSQL.

Step 2: Loading data from PostgreSQL to Looker

Once you have transferred data into PostgreSQL, log in to your PostgreSQL shell and create a user for Looker and provide the necessary permissions. You can do this using the following lines of code:

CREATE USER looker WITH ENCRYPTED PASSWORD 'some_password_here';
GRANT CONNECT ON DATABASE database_name to looker;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO looker;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO looker;

Launch Looker and login to your dashboard. Click on the Connections tab and select the new connection option.

google analytics to looker

The connection settings page will now open up. Choose PostgreSQL as the dialect here. Add your PostgreSQL URL and port values. You now need to provide the details of the PostgreSQL user you had created.
Set the maximum connection parameter to 75 and the pool timeout parameter to 120.

Click on the add connection option. In the SQLRunner, select the configured connection from the list on the left and start analyzing your Google Analytics data.

This is how you can connect Google Analytics to Looker by using PostgreSQL as an intermediate database.

Limitations of this method

  • To always have up-to-date data in Looker, you need to refresh the data periodically. This requires users to write custom code lines that can periodically perform a data refresh. This can be a challenging task for the users.
  • This method requires users to make multiple configurations to access APIs repeatedly.

Conclusion

This article introduces you to the various methods that can be used to connect Google Analytics to Looker. It also provides in-depth knowledge about the concepts behind every step to help you understand and implement them efficiently. These methods, however, can be challenging, especially for a beginner & this is where Hevo saves the day. Hevo Data, a No-code Data Pipeline helps to transfer data from Google Analytics & multiple sources to your desired data warehouse and visualize it in Looker without having to write the code repeatedly. Hevo with its strong integration with 100+ sources & BI tools, allows you to not only export & load data but also transform & enrich your data to make it analysis-ready in a jiff.

Want to take Hevo for a spin? Sign up here for a 14-day free trial! and experience the true power of Hevo.

Tell us about your experience of connecting Google Analytics to Looker! Share your thoughts in the comments section below.

Visualize Your Google Analytics Data In Looker Easily