Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Power BI does not reflect Google Analytics

I've connected Power BI Desktop to Google Anayltics, here is the MDX:

let
    Source = GoogleAnalytics.Accounts(),
    #"XXXXXXXX" = Source{[Id="XXXXXXXX"]}[Data],
    #"UA-XXXXXXXX-1" = #"XXXXXXXX"{[Id="UA-XXXXXXXX-1"]}[Data],
    #"YYYYYYYY" = #"UA-XXXXXXXX-1"{[Id="YYYYYYYY"]}[Data],
    #"Added Items" = Cube.Transform(#"YYYYYYYY",
        {
            {Cube.AddAndExpandDimensionColumn, "ga:pagePath", {"ga:pagePath"}, {"Page"}},
            {Cube.AddAndExpandDimensionColumn, "ga:date", {"ga:date"}, {"Date"}},
            {Cube.AddMeasureColumn, "Unique Pageviews", "ga:uniquePageviews"}
        }),
    #"Removed Errors" = Table.RemoveRowsWithErrors(#"Added Items", {"Page"})
in
    #"Removed Errors"

 

I've created a custom column (named page test) that that assigns a string if the page contains a particular string, for example if the page contains "meter-applications" assign Meter Applications. From April 2021 until today the dashboard shows that there are only two pages that contains "meter-applications" with a total of 3308 unquie pageviews, see screenshot below:

 

dashbord report.png

However, when comparing to Google Anlytics report, the number is way under and it's also missing another two pages:

Picture3.png

 

The power BI visuale is way under for all pages, and is even missing some. I've tried filtering to the time period in power query and filtering to only the pages containing the strings I've wanted and that doesn't seem to fix it. I'm at a loss as to why Power BI won't report the Google Anyltics data propberly.

 

Any help is much appreciated!

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Please refer to the following links regarding this issue:

https://community.powerbi.com/t5/Power-Query/Different-results-with-same-query-using-Google-Analytics-Built/m-p/647879 

https://community.powerbi.com/t5/Desktop/Data-from-Google-Analytics-Doesn-t-Match/td-p/133680 

 

Google Analytics is using the Sampling data for analytics. In Google Analytics, you can adjust the value for samplingLevel parameter to increase the accuracy https://developers.google.com/analytics/devguides/reporting/core/v3/reference?hl=en#samplingLevel 

 

However changing the sampling parameter in PBI Desktop is not possible currently. And the product team currently have no plans to add support for this feature.

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

 

View solution in original post

2 REPLIES 2
QueryWhiz
Helper V
Helper V

Hi, were you able to find a solution? I used the GA native connector but had some issues with my data sometimes. As a workaround, maybe you can try to test your connection with a 3rd party connector. I've tried windsor.ai, supemetrics and funnel.io. I stayed with windsor because it is much cheaper so just to let you know other options. In case you wonder, to make the connection first search for the GA connector in the data sources list:

 

GA-1.png

 

After that, just grant access to your GA account using your credentials, then on preview and destination page you will see a preview of your GA fields:

 

GA-2.png

 

There just select the fields you need. Finally, just select PBI as your data destination and finally just copy and paste the url on PBI --> Get Data --> Web --> Paste the url.

 

SELECT_DESTINATION_NEW.png

v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Please refer to the following links regarding this issue:

https://community.powerbi.com/t5/Power-Query/Different-results-with-same-query-using-Google-Analytics-Built/m-p/647879 

https://community.powerbi.com/t5/Desktop/Data-from-Google-Analytics-Doesn-t-Match/td-p/133680 

 

Google Analytics is using the Sampling data for analytics. In Google Analytics, you can adjust the value for samplingLevel parameter to increase the accuracy https://developers.google.com/analytics/devguides/reporting/core/v3/reference?hl=en#samplingLevel 

 

However changing the sampling parameter in PBI Desktop is not possible currently. And the product team currently have no plans to add support for this feature.

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.