1

I'm trying to work out whether the Google Analytics reporting API for the userActivity search returns any sampling on the data.

The documentation for the API: https://developers.google.com/analytics/devguides/reporting/core/v4/rest/v4/userActivity/search

The documentation return response JSON:

{
  "sessions": [
    {
      object(UserActivitySession)
    }
  ],
  "totalRows": number,
  "nextPageToken": string,
  "sampleRate": number
}

For the sampleRate, it states:

This field represents the sampling rate for the given request and is a number between 0.0 to 1.0. See developer guide for details.

But what does 1.0 actually mean? Does it mean it returns 100% of the sessions? The links it provides doesn't actually mention anything about the sample rate as a number.

I've tried to compare the JSON response with the Google Analytics UI, but this didn't confirm whether the data is sampled in the API response.

DarkKnight
  • 23
  • 6
  • Good question, it's not very well documented but I imagine 1.0 being 100% and 0.1 a 10% sample of the sessions. Trial and error in this case might be a good idea. – F. Leone Jun 03 '19 at 11:54

1 Answers1

0

It means that the dimensions and attributes gathered/calculated are based on 100% of the sessions. If it is say 0.6, then it is only based on 60% of the sessions.

XTOTHEL
  • 5,098
  • 1
  • 9
  • 17