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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.