Connecting Google Analytics to Power BI

The ability to connect Power BI to Google Analytics is an incredibly powerful method to visualize and analyze the large amounts of data collected by Google. We’ll explain how to establish the connection and some tips to get you started exploring the Google Analytics data.

How to Connect Power BI to Google Analytics

To connect Power BI to Google Analytics in Power BI Desktop go to Get Data > More > Online Services > Google Analytics. Log into your Google account when prompted. Next, select an implementation method. 1.0 has predefined metrics while 2.0 gives provides more precise control.

Step 1.) Get Data

Go to the Home tab of the Power BI Ribbon and select Get Data > More > Online Services > Google Analytics

Screenshot of the Power BI desktop Get Data button

The Google Analytics connector is available under Online Services and comes pre-installed with Power BI Desktop as a built-in connector provided by Microsoft.

Select the Power BI to Google Analytics Connector under Online Services

Step 2.) Select a Connection Version 2.0 for GA4

While both connectors will allow you to pull Google Analytics data into Power BI, 2.0 is the only version that supports GA4 which became the only supported implementation of Google Analytics beginning in July of 2023.

Power BI can import Google Analytics GA4 data using implementation 2.0 beta
  • 1.0 is easier to use – The 1.0 implementation is organizes measures and metrics into folders and provides a more curated experience. It is easier to put together a report highlighting the most popular and common calculations.
  • 2.0 Has better Performance, more metrics, and supports GA4 – Data pulls in faster in the 2.0 version of the Google Analytics Connector. Data pulls can take a long time depending on how detailed the data is and how large the Google Analytics Property or website is.

Step 3.) Select Measures and Metrics to Import

The next screen gives an extensive list of measures and metrics. Users will need to select a combination of them to pull into Power BI

Screenshot of google analytics metrics available in GA4
Screenshot of Power BI and Google Analytics dimensions in GA4

When pulling data into Power BI, keep in mind that you can build relational models within Power BI. This means that you can bring in multiple queries, but will need to be able to relate them based on a commonality.

Step 4.) Load Data into Power BI using Import Mode

After selecting the fields to bring into your data model, click ok and load them into Power BI Desktop. This process can take a long time to run if working with a large dataset. Setting up features like incremental refresh can be beneficial when deploying your Google Analytics dashboard to production.

be aware that the more granular and detailed the data is, the longer it will take to import. Importing data that is already aggregated will provide a much faster experience.

Understanding Google Analytics Measures and Metrics

Google Analytics is multi-dimensional. It allows you to analyze data across multiple dimensions simultaneously, such as time, geography, device type, user behavior, etc. Dimensions can be paired with various metrics to provide a comprehensive view of website performance and user interaction.

The example below is a screenshot from the 1.0 implementation. You have to select both a dimension and a metric for the query to work.

Select dimensions and metrics to import from Google Analytics to Power BI

The difference between a Matric and a dimension can be somewhat confusing. For a query to work, it will need both pieces.

Metrics

  • Definition – A metric is a quantitative measurement that provides numerical data.
  • Example – Pageviews, Bounce Rate, Active Users.

Dimensions

  • Definition – A dimension is a qualitative attribute that can be paired with metrics to segment data.
  • Example – Country, Device Category, Browser.

It may take some experimentation to figure out which combination of Dimensions and Metrics are needed. Google will not let you run a query that is not valid. So, if you get an error you won’t have to wait for a bad query to run.

Finding the Right GA4 Dimensions and Metrics

One of the most difficult parts of using Google Analytics is determining which dimensions and metrics to use. Google provides a tool to view different possible combinations in the form of a query builder.

There is a Universal Analytics (UA) version along with a GA4 version you can find here: GA4 Dimensions & Metrics Explorer

Editing a Google Analytics Query in Power Query

One of the challenges with connecting to Google Analytics is that it connects to data as a datacube. This means that you cannot interact with the data in the same way that you would when working with an Excel file or a SQL database.

Go to the Power Query Editor in Power BI and, click on Added Items from the Manage Cube Tools Section of the Ribbon..

Modify a Power BI and Google Analytics query using the Cube Tools Add Items or Collapse Items option

From here you can Add Columns to choose different combinations of metrics and dimensions to work with.

Importing Google Analytics Data into Power BI Faster

If it is taking a long time to pull in a dataset, you may need to limit the query. For example, if you want to bring in something like Page Views by Page by Country by Day and you have a lot of content it can take a long time for Power BI to download all of the data.

Option 1 – Modify the query to bring in less data at once. For example, use 28 day active users instead of daily active users.

Option 2. – Schedule Power BI to pull the data for you during off hours

Option 3 – Setup incremental refresh.

Part of the Power BI architecture is to download data and store it into a Power BI .pbix file. Even though the data structure itself is very efficient, it can still take a long time to download. It can also be beneficial to understand how to work with large semantic models in Power BI when connecting to websites with large amounts of data.

Scroll to Top