0
votes

I am trying to get the goals from our google analytics account but applying a date range. I haven't seen in the documentation a way to pass a date range for this method. Any help would be appreciated! Thanks!

Testing using their API test page here: https://developers.google.com/analytics/devguides/config/mgmt/v3/mgmtReference/management/goals/get

GET https://www.googleapis.com/analytics/v3/management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/goals/goalId

When I pull the request using the their test API page, I am assuming it is only pulling the goal conversions for the day I am making the request, not for all of time.

1

1 Answers

1
votes

I think you might be confusing the reporting api with the management api.

If you want to get data out of GA, use the reporting api.

If you want to configure GA or read GA configurations, use the management api.

In your case, you want to REPORT on the goals, but you're using the management api to do so.

You should use the reporting API to get a list of goals completed.

Reporting API reference/documentation: https://developers.google.com/analytics/devguides/reporting/core/v4/