I’m currently trying to pull revenue data for specific users out of Amplitude using the Revenue LTV endpoint but getting some unexpected behavior.
Before I even added a segment definition to define specific users in the request I wanted to understand its behavior and I’m not getting the results I’d expect.
Is the request I’m making. From the documentation I thought this would be the daily (i=1) TOTAL REVENUE (m=2) of our Users. However my response is essentially empty data:
This continues for every day in the range. I make the same request except change the interval to 7 and…
The number 217844.1 continues for many more lines before another empty empty dictionary like before. Why is my data going from completely empty to this upon changing the interval? I can confirm there is purchase data for every day in that range.
I added a segment definition to try and pull data from a specific store and one again got a whole list of “0” values.
I was under the impression from the documentation I’d get a “count”, “paid” and “total_amount” with this data but I see no such fields.
Is this behavior expected and I’m just misunderstanding the purpose of the endpoint or is something wrong with the request itself? To restate: my ultimate goal is to pull the TOTAL REVENUE for a given user within a date range.
Any help would be appreciated, thanks!
Best answer by daniel.balan
@jnazemi having a look at this I think the reason why you are getting unexpected results is because the Revenue LTV chart and end point looks at new users. So if within the selected timeframe, the revenue data is not sent by new users, then this will not be captured as a result. You might want to double check this with a Revenue LTV chart in your org.
As a workaround for this, you could use the Event Segmentation end point, using the Revenue event. Link to developer docs here: https://developers.amplitude.com/docs/dashboard-rest-api#event-format