Forum Discussion

Yuhan's avatar
Yuhan
Regular Visitor
6 years ago

Google Analytics: How to specify samplingLevel?

As far as I know, Power BI still uses the old Core Reporting API v3 to connect to Google Analytics, not v4. For those that don't know, you could reduce sampling when querying GA data by specifying samplingLevel=HIGHER_PRECISION. Source: https://developers.google.com/analytics/devguides/reporting/core/v3/reference#samplingLevel 

 

 If that is the case, is there a way to input the samplingLevel in the M code when opening the Advanced Editor in the query editor?

3 Replies

    • Yuhan's avatar
      Yuhan
      Regular Visitor

      IceyThanks for linking the Query Explorer, I did not know of this.

       

      However the Query Explorer outputs queries as an URI. I'm guessing Power Bi is letting us write our queries in M and then converting that into an URI for Google. But some options available in the API seems to be unsupported in M. For example, the query URI may include a samplingLevel option, but how can I code that using the Advanced Editor?

       

      I'm not sure the passing parameters do the trick either, because they are written in M too.