Open alexeyqu opened 11 months ago
I'm also very interested in this! I was surprised to see that the API is limited by the same range (LAST_6_MONTHS
) that we see in the UI. I'm hoping to be able to see all-time page view counts and add this feature to the dashboard.
From cursory exploration in the MongoDB it looks like all the records are still there ... so being able to query them all in the API would be fantastic!
I did end up figuring this out! Re your questions @alexeyqu:
range
filters in the code in multiple places, but I was able to add "Last 12 Months" as well as "Last 7 Years" (and I believe there would be no limit here)Check it out here: https://github.com/UnlockNYC/Ackee/commit/3a70457ed2595fe288f4698914f5d595d35a6598
@mab253 This works fine. It would be great if at least the "Last 12 Months" option gets merged. Could be helpful for a yearly review. Did you consider creating a PR for this?
Hi, I am new here and curious if it is possible to query complete view counts for a page?
The
getDomains.statistics.pages
query needs arange
param which can't be null and only allows to query data up to 6 months.So, 2 questions (I could probably figure this out from code but want to confirm) 1) are the views stored indefinitely in the DB? i.e. does Ackee delete 6 months+ old records? 2) is there any way to query that historic data from the API? IMO the simplest idea would be to make the
range
param nullable which will allow to not have anycreated
filters in the aggregations.Happy to make a PR for the latter. Thanks!