Power BI Connecting to Google Analytics
When I started my WordPress blog I added a Google Analytics plugin. This allows me to track visitors to my blog. So now I have a few years worth of data to load into a Power BI report. Power BI has a Google Analytics connector. This blog post is to walk through building a simple report on my blog visitors.
YouTube Video
For those who prefer a video guide.
Creating the connection to Google Analytics
In Power BI desktop the connector can be found under Get Data > More and then Online Services.
The connector relies on a third party, i.e. Google. Therefore Power BI shows a message warning the connector user that Microsoft can’t guarantee the connector will always work correctly. Google will also confirm that its okay for Power BI to connect to your Google Analytics.
Selecting Fields
When the connection is established the Navigator dialog lists all the fields grouped in folders. The fields have two types, Dimensions and Measures. Every report must include at least one of each. For this example I select from the Time folder, Date and Month of Year as the dimensions. Then from the Page Tracking folder I select the measure Pageviews. Finally I click Load to get the data into my report.
Quick Chart
A quick column chart, using Month of Year and Pageviews shows the page views over the past few years.
Adding more fields from Google Analytics
Google analytics has many more dimensions and measures to explore. After you click on Transform and return to Power Query you can see the applied steps. My first attempt to add more dimensions to the query was to click on the cog next to Added Items. This gives you can error so you cannot just modify that step.
The error is not a problem. Instead of modifying the existing step, the easiest method to add new dimensions is to add a new step. On the Cube Tools – Manage ribbon, click on Add Items. For this example I added the following:
- Geo Network
- Continent
- Country
- Platform or Device
- Browser
- User
- Users
After adding the new items, I return to the report and add slicers and more visuals.