Forum Discussion
Google Analytics Complete Connector
Hello v-shex-msft
Thanks for your reply.
The official method could be a solution by creating an ETL process behind, but I am trying to exctract directly data using Power BI.
Using M Language, my scope would be:
- Getting Authorization Code using https://accounts.google.com/o/oauth2/v2/auth.
- Using Authorization Code, getting Token using https://accounts.google.com/o/oauth2/token.
- Using Token, getting data from Google Analytics using Analytics API.
It works creating a Custom Connector via Visual Studio, but it does not work in Power BI Service, since I cannot use custom connectors there. Therefore, I am trying to create the same logic using M language directly in Power BI Desktop.
My first issue is getting Authorization Code using Web.Contents function. This function returns the correct page that includes the Code parameter as response inside of the URL.
Now, how can I get a parameter inside of an URL using M language?
Regards
Lino
HI Lino,
You can take a look at below link:
authenticating with Excel Power Query against .Net Odata Web Api
BTW, current custom power query functions only available on desktop side.
Regards,
Xiaoxin Sheng
- Lino8 years agoFrequent Visitor
Hi Anonymous
Thanks a lot for your suggestion, but I used GoogleAnalytics.Accounts() built-in function and everything is working with both the Desktop and the Service version.
Unfortunately, I cannot set filters before the extractions, but at the moment I am not encountering issues.
Regards
Lino
- Lino8 years agoFrequent Visitor
I want to rectify. Unfortunately, the built-in Google Analytics connector does not work correctly, and therefore I opened this discussion.
- Roel8 years agoFrequent Visitor
It works correctly, but it's requesting all data ever from the GA API.
As a result GA sampling is destroying your data. This in turn makes the connecter useless for anything except the most basic things. (like all visits of a period of time)
They really need to change the way the connecter works so you can specify the data range, but more importantly, like all other tools for GA, allow you to break up the query in smaller sections.