Displaying Analytics
Learn how to begin displaying analytic events
Last updated
Learn how to begin displaying analytic events
Last updated
Count is powerful but surprisingly simple. This is the most performant call you can make when querying analytics. Any required fields or custom data fields are queryable, with the main fields to keep in mind being object_id
when applicable and events
.
When performing any query type, we always use events
as an array of event names or objects (if more complex querying) like so:
This method takes advantage of daily and total caching. It is built to be highly performant and snappy up to trillions of events queried.
Here's an example in a single file we'll call query-today.js
. We'll be getting a count of today's page views:
Here's an example in a single file we'll call query-week.js
. We'll be getting a count of today's page views:
Aaaand just like that, you have working customer-facing analytics! 💥Applying this gives you unlimited potential for customer engagement through metrics.
If you have any questions, feel free to reach out any time if you need help at hi@plaudy.com.
Name
Type
Default
Values
Required
events
array
[ ]
any
true
timeframe
string, object
"all_time"
["today", "this_day", "this_week", "this_month", "this_year", "yesterday", "last_day", "last_week", "last_month", "last_year"]
OR
An object with both start
and end
as unix timestamps (see code above)
false
user_id
string
"no_tracked_user"
any
false
object_id
string
"no_object_id"
any
false