79168499

Date: 2024-11-08 01:05:39
Score: 0.5
Natty:
Report link

If you add limit=250000 to your query do you get all of the data? I presume when you say the results are reduced you mean the date range is reduced and not the number of rows returned.

Data from the API is paginated with a default of 10,000 rows and a max of 250,000 rows. For more than 250,000 rows you'll have to also set an offset parameter and run the query again.

You can find details here:

https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runReport#:~:text=The%20number%20of%20rows%20to,how%20many%20you%20ask%20for.

RunReportRequest(
            property=f"properties/{GOOGLE_ANALYTICS_ID}",
            return_property_quota=True,
            dimensions=[
                Dimension(name="date"),
                Dimension(name="customEvent:itemId”),
                # Dimension(name="customEvent:companyId), # Uncommenting causes problem
            ],
            metrics=[
                Metric(name="eventCount"),
            ],
            date_ranges=[
                DateRange(start_date='2024-03-25’, end_date='2024-09-25’),
            ],
            limit=250000
        ) 
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Jason Gaskin