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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Data Flows with Google Analytics cannot authenticate

I've attempted with different Power BI tenants as well as Google Analytics accounts and cannot successfully authenticate when attempting to create a data flow using Google Analytics. This is supposed to be supported per these links:

 

https://powerbi.microsoft.com/en-us/blog/power-bi-dataflows-january-updates/

https://docs.microsoft.com/en-us/power-bi/service-dataflows-data-sources

 

Here is a screenshot of the error I am currently receiving (a pop up window appears momentarily to attempt to authenticate, then dissappears before rendering the error you see). Yes, my pop up blocker is turned off.

 

pbi_dferror.jpg

 

 

This is the supported M query that works just fine in PBI desktop:

let
    Source = GoogleAnalytics.Accounts(),
    #"23715579" = Source{[Id="23715579"]}[Data],
    #"UA-23715579-1" = #"23715579"{[Id="UA-23715579-1"]}[Data],
    #"46652768" = #"UA-23715579-1"{[Id="46652768"]}[Data],
    #"Added Items" = Cube.Transform(#"46652768",
        {
            {Cube.AddAndExpandDimensionColumn, "ga:exitPagePath", {"ga:exitPagePath"}, {"Exit Page"}},
            {Cube.AddAndExpandDimensionColumn, "ga:hostname", {"ga:hostname"}, {"Hostname"}},
            {Cube.AddAndExpandDimensionColumn, "ga:landingPagePath", {"ga:landingPagePath"}, {"Landing Page"}},
            {Cube.AddAndExpandDimensionColumn, "ga:pagePath", {"ga:pagePath"}, {"Page"}},
            {Cube.AddMeasureColumn, "% Exit", "ga:exitRate"},
            {Cube.AddMeasureColumn, "Avg. Time on Page", "ga:avgTimeOnPage"},
            {Cube.AddMeasureColumn, "Entrances", "ga:entrances"},
            {Cube.AddMeasureColumn, "Entrances / Pageviews", "ga:entranceRate"},
            {Cube.AddMeasureColumn, "Exits", "ga:exits"},
            {Cube.AddMeasureColumn, "Page Value", "ga:pageValue"},
            {Cube.AddMeasureColumn, "Pages / Session", "ga:pageviewsPerSession"},
            {Cube.AddMeasureColumn, "Pageviews", "ga:pageviews"},
            {Cube.AddMeasureColumn, "Time on Page", "ga:timeOnPage"},
            {Cube.AddMeasureColumn, "Unique Pageviews", "ga:uniquePageviews"}
        })
in
    #"Added Items"

It doesn't seem to matter which query I attempt to use, same error anyways.

 

I have attempted to setup the data flow on both the North Central US (Illinois) and the Southeast Asia (Singapore) tenants.

 

Status: Needs Info
Comments
Anonymous
Not applicable

@Anonymous,

I am able to connect to Google Analytics in dataflow using the M code below. I am using organizational account and sign in with a @gmail.com account. Do you still get the above error? What type of account do you use?

let
    Source = GoogleAnalytics.Accounts(),
    #"80056532" = Source{[Id="80056532"]}[Data],
    #"UA-80056532-1" = #"80056532"{[Id="UA-80056532-1"]}[Data],
    #"124765743" = #"UA-80056532-1"{[Id="124765743"]}[Data],
    #"Added Items" = Cube.Transform(#"124765743",
        {
            {Cube.AddAndExpandDimensionColumn, "ga: sessionCount", {"ga: sessionCount"}, {"Count of Sessions"}},
            {Cube.AddAndExpandDimensionColumn, "ga: userType", {"ga: userType"}, {"User Type"}},
            {Cube.AddMeasureColumn, "Users", "ga: users"}
        })
in
    #"Added Items"

Capture.PNG

Regards,
Lydia

Anonymous
Not applicable
 
Anonymous
Not applicable

I am using valid google analytics accounts that can authenticate through Power BI desktop just fine. The pop up dialog to authenticate does not render when setting up credentials in the data flows blank query. I would be more than happy to demonstrate the error in real time-- I have tested this in both North Central US (Illinois) and the Southeast Asia (Singapore) tenants -- I would ask that you attempt the same query on one of these tenants to see if the issue is repeatable for you.