Forum Discussion
M Language code to connect Google Analytics api directly to Power BI
This program is written on M# language and it is used for retrieving data from Google Analytics API directly to Power BI
Here is the link of Dashboard which I am using -
https://github.com/maxim-uvarov/PQGoogleAnalytics/files/647569/PQGoogleAnalytics2.02.zip
After that, I am following steps
- Open the settings of Power BI, go to the "Privacy" tab, choose the setting "Always ignore the Privacy Level settings".
- Open the link below in your browser, hit the "Allow" button and copy the given token (I changed client code to my GA account client code)
- Open Power Query by hitting "Edit Queries" button on the "Home" tab on the ribbon of Power BI.
- Paste the token from the step 1 into "authToken" parameter.
- Go to "getRefreshToken" query and Copy the token from your preview window.
- Paste the token from the step 5 into "refreshToken" parameter.
After pasting the “refreshToken” I clicked “close and apply” button in the power BI, I am getting following error
I tried other options(Windows,A PI, Basic etc.) for authentication but not able to connect.
Hi ayush,
Based on your steps, I could nof figure out what you want to get in your advanced editor:
- The token I got from the link means what? I saw you have used it as parameter but I could not figure out how to use.
- The 'code' and 'url' you written in the advanced editor seem stitching many parts of code, could you please offer more information about it? And the app_crendentials stands for what
Regards,
Daniel He
3 Replies
- v-danhe-msftMicrosoft Employee
Hi ayush,
Based on your steps, I could nof figure out what you want to get in your advanced editor:
- The token I got from the link means what? I saw you have used it as parameter but I could not figure out how to use.
- The 'code' and 'url' you written in the advanced editor seem stitching many parts of code, could you please offer more information about it? And the app_crendentials stands for what
Regards,
Daniel He
- ayushFrequent Visitor
- v-danhe-msftMicrosoft Employee
Hi ayush,
It's pleasant that your problem has been solved, could you please mark a reply as Answered?
Regards,
Daniel He