Hey there! Hmmm, it appears there might be an odd bug causing this confusion. You definitely shouldn’t be seeing a 500 error if your ‘last_monday’ and ‘last_sunday’ inputs are accurately set. This merits some attention for sure.
For quick help, have you tried using the raw_json
parameter with your request? This assumes you have valid JSON data for your request. Here is how you could proceed:
`R
raw <- '{"dimensions":[{"name":"itemId"},{"name":"nthWeek"}],"metrics":[{"name":"averagePurchaseRevenue"},{"name":"itemPurchaseQuantity"},{"name":"itemRevenue"}],"dateRanges":[{"startDate":"2022-08-01","endDate":"2022-08-07"}]}'
ga_data(propertyId = property_id, raw_json = raw)
`
As a result of doing this, API requests will be generated with raw JSON and produce a series of outputs, including items like ‘itemId’, ‘nthWeek’, ‘averagePurchaseRevenue’, among others.
This should help you bypass the issue for now. And at the same time, could you flag this anomalous bug on the GitHub page of the project? The developer community would definitely appreciate it!