Easily load Google Analytics data into Power BI

Here’s how to get your Google Analytics data into your Power BI reports easily – low-cost and flexible.

Google Analytics data and Power BI aren’t always best friends when it comes to data exchange. The low-code platform n8n offers a cost-effective way to connect both ecosystems.

Outline: Google Analytics to Power BI

The following scenario describes a data export from Google Analytics and a data import into Power BI using n8n automations. Accordingly, the setup includes components from n8n, storage platforms like SharePoint and OneDrive, optional database technologies like MySQL or Microsoft SQL, and Power BI. The base setup costs between €5 and €10 per month.

If you’re interested in specific aspects, jump directly to the relevant section:

#1 Base setup for small businesses

#2 Flexible setup for corporate scenarios

#3 Notes on cost and benefit calculation

#1 Base setup for Google Analytics and Power BI for small businesses

If you have a website or shop and want to see your first web analytics data (sessions, users, channels, etc.) in your standard Power BI reports, you should start small. With a simple n8n flow, you can:

  1. Fetch/refresh data daily
  2. Pull the data for the GA4 property from the Google Analytics API
  3. Package everything as a .csv file and upload it to Microsoft SharePoint
  4. Load the GA4 raw data into your reports via the Power BI SharePoint connector (can also be refreshed in the web app).
Google Analytics, Power BI connection via n8n base setup

The Daily 2am node triggers the flow every night at 2 AM. The Google Analytics Sessions Channels node pulls data for the session source/medium dimension, as well as the date and number of sessions, from the API. CSV Sessions Channels converts the JSON response into a .csv file, and the Sharepoint Upload CSV Node then uploads it to the company SharePoint.

From SharePoint, the data can be loaded into Power BI using the SharePoint Folder connector and processed further there.

Google Analytics, Power BI connection via SharePoint Folder

Advantages of the base setup

Extremely flexible: Depending on what you want to display in your organization’s Power BI reports, you can add a new execution route in just a few clicks. This example exports a table from Analytics listing sessions by channel source/medium, for instance. But you could just as easily export events, users, or transactions.

Very affordable, between €5 and €10: The n8n instance in this example runs on sliplane hosting – a Docker host – for €10 per month. There are also VPS offers starting at €5 per month. The Google Analytics API is free. The SharePoint license – if not already included in Microsoft Office 365 – is available from €5 per month (per user).

Easy to set up with a UI: All nodes used are standard nodes with a graphical user interface that’s quick to understand with just a bit of clicking around.

Things to watch out for

Properties with extremely high traffic lead to large response binaries when querying the Google Analytics API. This requires some logic to trim query time ranges appropriately and also to account for the post-processing window (approx. 2 days) of data in Google Analytics.

The performance of the SharePoint connector with .csv files is finite. Too many or too large .csv files can significantly increase load times in Power BI Desktop and, in some cases, in the web app as well.

Corporate setup: Google Analytics and Power BI connection for larger organizations

Many use cases are somewhat more complex than the base setup. Those responsible at companies often run into limitations like the following:

  1. The website/shop has very high traffic, or there are even multiple websites and Google Analytics properties.
  2. There’s a central IT or BI department that considers handling .csv files a human rights violation, or wants a say in data storage of any kind.

For this case, you can extend the base setup – in a way that optimizes both performance and stakeholder concerns. With this flow:

  1. Data is fetched three times daily.
  2. Data for multiple GA4 properties is pulled from the Google Analytics API
  3. and transferred into a database structure of your choice (here: a MySQL database)
  4. The .csv files are moved to long-term storage as a backup or for further processing (here: SharePoint; alternatively: Azure Blob Storage, Amazon S3, Google Cloud).
  5. The data is made available for consumption via faster SQL connectors in Power BI.
Google Analytics, Power BI connection via n8n corporate setup
  • Daily 2am 10am 6pm – Triggers a data pull every 8 hours.
  • SQL query DROP Table – Removes the old database table.
  • SQL CREATE Table – Recreates the database table.
  • IDs thebigc-agency.de + .eu – Stores the Google Analytics property IDs for both domains.
  • for each GA4 Property – Ensures the subsequent process runs for both property IDs.
  • Google Analytics Sessions Channel – (GA4 node) Pulls the session data from the GA4 API.
  • SQL INSERT Data – Inserts the new data into the MySQL database.
  • CSV Backup – Creates a CSV file from the JSON data in the GA4 node response.
  • UPLOAD Blob – Uploads the CSV to a storage location of your choice (e.g. S3, Azure, etc.).

The data can then either be imported into Power BI Desktop via the MySQL Power BI connector, or – even better – if you have a Microsoft SQL Server lying around somewhere. In that case, the database also supports Direct Query.

The .csv files can then be stored in a blob storage as a backup or for rebuilding the data basis. The cost for around 500 files with daily pulls is roughly €5 to €10 per month.

Advantages of the corporate setup

The data can be written/sent anywhere. In this example, that’s a MySQL database. But if your central IT provides a different storage structure, that can likely be accommodated as well.

The setup is still flexible – while database schemas now need to be maintained, if you handle the SQL executions carefully, you can practically build new data export types daily and extend existing Power BI reports.

The price is significantly lower than a full-blown data pipeline infrastructure. The additional €5 to €10 per month in costs can often even be absorbed within the organization, since nearly every organization already has existing licenses for server and database infrastructure “lying around” somewhere.

The setup can be extended and duplicated. If Google Analytics traffic volumes ever get out of hand, flows can still be restructured more efficiently, or used as a template when building a data lakehouse architecture.

Data privacy processes. While the data does originate from and was already stored by Google in the US, with a self-hosted n8n environment it may not be necessary to contractually bring another service provider on board for intermediate storage.

Things to watch out for

You should have basic syntax knowledge. You move a bit outside the UI world when working with database nodes in n8n. Accordingly, some SQL knowledge is recommended (or the equivalent for your intended flow destination).

Managing the n8n instance: If you’re pulling 5 massive exports every 8 hours, you can really put strain on your n8n instance and the associated VPS. You should pay closer attention to storage, logging, and the like here.

Notes on cost and benefit calculation

Accounting for costs you’d incur anyway

The biggest question when calculating monthly costs lies in how you account for licenses you already have. Interesting questions here include:

Should a Microsoft Business license for SharePoint (from €5 per month) be included if you’re already storing all your PowerPoints there anyway?

Aren’t there databases somewhere already paid for through a larger subscription?

Or also: Are the Power BI licenses starting at €9 per user per month part of the calculation?

Accordingly, we would include the following cost items in the calculation.

Cost calculation: base setup

ItemCost
n8n hosting / VPSbetween €5 and €15 per month
n8n license, 1 user (cloud version)from €20 per user per month
Databasefrom €3 for simple MySQL databases
from €20 for an Airtable license or similar

This results in a price between €8 and €18 per month if you self-host. And roughly €20 to €40 per month per user if you want to get everything as SaaS.

Cost calculation: corporate setup

ItemCost
n8n hosting / VPSbetween €5 and €15 per month
n8n license, 1 user (cloud version)from €20 per user per month
Databasefrom €3 for simple MySQL databases
from €20 for an Airtable license or similar
Blob storage€5 – €15 per month (depending on storage and requests)

This results in a price between €12 and €33 per month if you self-host. And roughly €25 to €55 per month per user if you want to get everything as SaaS. Costs naturally increase in the “managed” variant if multiple team members need access to the infrastructure.

Overhead costs

The following overhead costs should be considered, but only allocated proportionally:

ItemCost
Power BI Pro license€9 per user per month
Microsoft Office 365 license (SharePoint)from €5.60 per user per month
(possibly €11.70 for desktop applications)

Extensibility of the pipeline setup with n8n

As already mentioned, the corporate setup is a good template for future data lakehouse processes, should they become necessary. The approach of the n8n flows can also be applied to data from other platforms:

Pulling data from Google Search Console is certainly a logical next step that can be modeled using a similar scheme. You might even want to tackle this before connecting GA4, since GSC data is only retained by Google for 16 months by default.

But other data sources from the marketing universe can be connected this way too, including:

  • Google Ads
  • Instagram / Facebook
  • Twitter / X
  • LinkedIn
  • Mailchimp
  • …

Need better Power BI reports?

We’ve been building professional Power BI reports for years – always with the user in focus. Contact us for a free consultation request. Maybe your reports could use a facelift too!