{"_id":"587e7bc318c2e22f00fe8104","__v":0,"user":"5668fa9755e4b32100935d41","parentDoc":null,"version":{"_id":"5668fab608f90021008e8832","__v":19,"project":"5668fab608f90021008e882f","createdAt":"2015-12-10T04:08:22.769Z","releaseDate":"2015-12-10T04:08:22.769Z","categories":["5668fab708f90021008e8833","569740f124490c3700170a64","569742b58560a60d00e2c25d","569742bd0b09a41900b2446c","569742cd69393517000c82b3","569742f459a6692d003fad8f","569743020b09a41900b2446d","5697430b69393517000c82b5","56a17776470ae00d00c30642","56a2c48a831e2a0d0069b1ad","56b535757bccae0d00e9a1cd","56e1ff6aa49fdc0e005746b5","57e1c88115bf6522002a5e4e","57fa65275ba65a17008b988f","57fbeea34002550e004c032e","58474584889b6c2d00fb86e9","58475dcc64157f0f002f1907","587e7b5158666c2700965d4e","58a349fc30852819007ba083"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.18.0","version":"1.18"},"category":{"_id":"587e7b5158666c2700965d4e","project":"5668fab608f90021008e882f","__v":0,"version":"5668fab608f90021008e8832","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-01-17T20:15:13.711Z","from_sync":false,"order":3,"slug":"analytics-api","title":"Analytics API"},"project":"5668fab608f90021008e882f","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-01-17T20:17:07.023Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Analytics =/= Recommendation\",\n  \"body\": \"Our aggregation engine is independent of our recommendation engine. There can be downtime or data loss on the aggregation engine. However, this will not mean that our recommendation system is down.\"\n}\n[/block]\nLiftIgniter logs every impression of your service, and you might want to make queries to get aggregated data. There are mainly 2 things that analytics API can do for you.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Online Querying with /item endpoint\"\n}\n[/block]\nIf you want specific stats for an item, then you can provide the date range and ID of the item to get how many times it was shown through LiftIgniter and how many times it got clicked. The data can be sliced based on arbitrary label you put into the data being sent over to us.\n\nThis query is handled in realtime, and we'll keep last 4 weeks worth of data in our aggregation engine. So if you wish to store the results long-term then you should reference the second feature or store the results for yourself.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"2. Retrieving results of scheduled query with /topn endpoint\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"In development\",\n  \"body\": \"POSTing custom queries are under development.\"\n}\n[/block]\nUsing this endpoint, you can build custom queries that you would like to run on the events you've sent us. You can schedule queries that store up to Top N items (whether it be page URL, or your internal service name), in which N could go up to as high as 50,000. If you set custom queries then the query will run every hour and be stored on our side so you can retrieve the data whenever you want. Unlike the first feature, the results here will be stored for indefinite amount of time.\n\nReading documentations on the `Metrics` can be helpful when designing your own queries.","excerpt":"","slug":"analytics-api-overview","type":"basic","title":"Analytics API overview"}

Analytics API overview


[block:callout] { "type": "info", "title": "Analytics =/= Recommendation", "body": "Our aggregation engine is independent of our recommendation engine. There can be downtime or data loss on the aggregation engine. However, this will not mean that our recommendation system is down." } [/block] LiftIgniter logs every impression of your service, and you might want to make queries to get aggregated data. There are mainly 2 things that analytics API can do for you. [block:api-header] { "type": "basic", "title": "1. Online Querying with /item endpoint" } [/block] If you want specific stats for an item, then you can provide the date range and ID of the item to get how many times it was shown through LiftIgniter and how many times it got clicked. The data can be sliced based on arbitrary label you put into the data being sent over to us. This query is handled in realtime, and we'll keep last 4 weeks worth of data in our aggregation engine. So if you wish to store the results long-term then you should reference the second feature or store the results for yourself. [block:api-header] { "type": "basic", "title": "2. Retrieving results of scheduled query with /topn endpoint" } [/block] [block:callout] { "type": "info", "title": "In development", "body": "POSTing custom queries are under development." } [/block] Using this endpoint, you can build custom queries that you would like to run on the events you've sent us. You can schedule queries that store up to Top N items (whether it be page URL, or your internal service name), in which N could go up to as high as 50,000. If you set custom queries then the query will run every hour and be stored on our side so you can retrieve the data whenever you want. Unlike the first feature, the results here will be stored for indefinite amount of time. Reading documentations on the `Metrics` can be helpful when designing your own queries.