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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
carlito
Frequent Visitor

Getting sampleSpace and sampleSize from Google Analytics API

Hey Everyone!

 

I'm using the Google Analytics connector for a few data sources, and noticed my data is getting sampled. That's not neccesarily a problem (although if anyone has ideas on how I can prevent sampling, that would also be welcome!), but it would be nice to be able to know the sample size of the data I'm looking at. 

 

I looked in the Google Analytics API documentation, and it looks like there are response fields, "sampleSpace" and  "sampleSize", that tell you the number of samples are in a space, and the number of samples used to calculate sampled data. 

 

Does anyone know how I can get these values from the API using the Google Analytics connector? I'm hoping to add the sample size to the dashboard so I know exactly how much my data is being sampled.

 

Thanks in advance!

- C

1 REPLY 1
Anonymous
Not applicable

@carlito,

For the sample issue in Power BI Desktop, please check response from Product Team.

This is expected behavior. The API we're using for Google Analytics is the one available to free users, and that API is known to return less accurate values for high volume sites due to the way it samples data. Unfortunately, the API for Google Analytics Premium customers is significantly different than that for the free users, so we'd need to implement a new connector specifically for Premium in order to get the more accurate values. This is not currently on our roadmap. Customers who would like to see this feature should request it or upvote it (if already there) at ideas.powerbi.com.

In addition, about the issue that how to get samplespace and samplesize values, I would recommend you contact Google Analytics support to check how to use its API to return thses values, then you can use web connector in Power BI Desktop to connect to the API and import the data.

Regards,
Lydia

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors