The stats, charts and tables from the Analytics page.
The numbers behind the Analytics page in the Toki app. analyticsStatsBlocks returns stat cards by ID; analyticsStatsChart returns current and previous chart series. Report operations return TokiAnalyticsTable objects whose columns tell you how to read each row's cells. Dates are ISO 8601 date-times and amounts are in your store currency.
analyticsStatsChartReturns a metric's chart for the selected period and the preceding comparison period.analyticsStatsBlocksComputes stat cards from the Analytics page for a period: one entry per ID in blocks, in the same order.analyticsDailyUserMetricsOverviewTableReturns the Daily Users Metrics Overview table: a column for each day from startDate to endDate, and rows for total members, active members, activities completed, and points earned and spent in your default store credit.analyticsActivityCompletionsGrowthTableReturns the Activity Completions Growth table: a row for each activity name with its completions in each month of the period, whatever their status, and a total column with its approved completions of all time.analyticsActivityCompletionsTableLists approved activity completions in the period (all time without dates), newest first, as the Activity Completions table: the member's email and name, the reward, the activity and when it was completed.analyticsTopReferrersTableReturns the Top Referrers table: up to 20 members whose referrals led to the most orders, with their membership, link clicks (sent), referred orders (redeemed), activation (orders per click) and the revenue of those orders.analyticsAllReferralActionsTableLists referral actions in the period (all time without dates), newest first, as the All referral actions table.analyticsReferralsByMembershipHoldersTableReturns the Referrals made by membership holders table: referred orders in each month of the last three months, with a row for each referrer membership and No Membership for referrers who hold none.analyticsTierGrowthTableReturns the Tier Growth table: how many members entered each membership in each month of the last three months, one row per membership in tier order.analyticsTiersOverviewTableReturns the Tiers Overview table: each membership's current number of members and the revenue from its members' orders, in tier order.analyticsPaidMembershipsOverviewTablesReturns the Paid Memberships Overview tables, one for each active paid membership and billing interval, with a column per day, week or month and the rows Total, New + Renewals, Renewed, New and Churned.analyticsManualRewardsTableLists manual balance adjustments in your default store credit in the period (all time without dates), newest first, as the Manually Given table: the member's email, the amount in points, your description and the date.Returns a metric's chart for the selected period and the preceding comparison period. Uses the same stored analytics and comparison dates as the portal chart.
startDateStringStart date, in ISO 8601 format. Defaults to 2021-01-01.
endDateStringEnd date, in ISO 8601 format. Defaults to now.
blockString!RequiredMetric ID, such as users.total, sales.aov or points.rewarded.
segmentIds[String!]Segment filter. Only the first ID is used; empty means all members.
periodTokiAnalyticsStatsChartPeriodBucket interval. Defaults to days.
daysweeksmonthsasMoneyBooleanConvert values using the default store credit's conversion rate. Does not affect sales.aov.
forAllShopsBooleanUse the merchant's aggregate across all stores instead of the current store.
Current and previous chart series.
currentTokiAnalyticsStatsChartCurrent!A metric's values over one comparison period.
previousTokiAnalyticsStatsChartCurrent!A metric's values over one comparison period.
Computes stat cards from the Analytics page for a period: one entry per ID in blocks, in the same order. Each diff compares the value with the period of the same length just before startDate; the period defaults to 2021-01-01 through now.
startDateStringStart of the period, as an ISO 8601 date-time.
endDateStringEnd of the period, as an ISO 8601 date-time.
forAllShopsBooleantrue includes all your stores instead of only the current one. Some stats and tables always cover all your stores and ignore it.
blocks[String!]!RequiredIDs of the stats to compute, such as users.total, users.active, sales.orders.volume, sales.aov, revenue.loyalty, referrals.sent or activities.completed. Point stats (points.rewarded, points.manuallyGiven, points.redeemed, points.applied, points.expired) return totals; add .count for the number of members. Tier stats take the tier's ID, as in tiers.<tierId>.newCustomers.
segmentIds[String!]Segment IDs to filter by, the same as the Segments filter on the Analytics page.
asMoneyBooleantrue returns point totals as their value in your store currency, converted at each store credit's default conversion rate. Counts aren't affected.
One stat card's value for the period.
blockString!The stat ID, as requested.
valueFloatThe stat for the period, such as a count, points or an amount in your store currency. Rates are fractions (0.25 is 25%). null for an unknown ID.
diffFloatThe change from the period of the same length before startDate, in percent; for revenue.roi and the repeat purchase rates, the difference between the two values. 0 when either value is zero or missing, null for an unknown ID.
Returns the Daily Users Metrics Overview table: a column for each day from startDate to endDate, and rows for total members, active members, activities completed, and points earned and spent in your default store credit. It always covers all your stores.
startDateStringStart of the period, as an ISO 8601 date-time.
endDateStringEnd of the period, as an ISO 8601 date-time.
forAllShopsBooleantrue includes all your stores instead of only the current one. Some stats and tables always cover all your stores and ignore it.
A table from the Analytics page, as columns and rows.
idIDIdentifies the table, such as top-referrers.
titleStringThe table's title on the Analytics page.
columns[TokiAnalyticsTableColumns!]!The table's columns, in display order.
rowsTokiAnalyticsTableRowConnection!The table's rows. Without arguments, every row the operation loaded.
Returns the Activity Completions Growth table: a row for each activity name with its completions in each month of the period, whatever their status, and a total column with its approved completions of all time. The period defaults to the last three months; the table always covers all your stores.
startDateStringStart of the period, as an ISO 8601 date-time.
endDateStringEnd of the period, as an ISO 8601 date-time.
forAllShopsBooleantrue includes all your stores instead of only the current one. Some stats and tables always cover all your stores and ignore it.
A table from the Analytics page, as columns and rows.
idIDIdentifies the table, such as top-referrers.
titleStringThe table's title on the Analytics page.
columns[TokiAnalyticsTableColumns!]!The table's columns, in display order.
rowsTokiAnalyticsTableRowConnection!The table's rows. Without arguments, every row the operation loaded.
Lists approved activity completions in the period (all time without dates), newest first, as the Activity Completions table: the member's email and name, the reward, the activity and when it was completed. Pass activityId for one activity; the table always covers all your stores.
startDateStringStart of the period, as an ISO 8601 date-time.
endDateStringEnd of the period, as an ISO 8601 date-time.
forAllShopsBooleantrue includes all your stores instead of only the current one. Some stats and tables always cover all your stores and ignore it.
activityIdStringOnly completions of this activity.
A table from the Analytics page, as columns and rows.
idIDIdentifies the table, such as top-referrers.
titleStringThe table's title on the Analytics page.
columns[TokiAnalyticsTableColumns!]!The table's columns, in display order.
rowsTokiAnalyticsTableRowConnection!The table's rows. Without arguments, every row the operation loaded.
Returns the Top Referrers table: up to 20 members whose referrals led to the most orders, with their membership, link clicks (sent), referred orders (redeemed), activation (orders per click) and the revenue of those orders. It counts clicks made in the period (all time without dates).
startDateStringStart of the period, as an ISO 8601 date-time.
endDateStringEnd of the period, as an ISO 8601 date-time.
forAllShopsBooleantrue includes all your stores instead of only the current one. Some stats and tables always cover all your stores and ignore it.
A table from the Analytics page, as columns and rows.
idIDIdentifies the table, such as top-referrers.
titleStringThe table's title on the Analytics page.
columns[TokiAnalyticsTableColumns!]!The table's columns, in display order.
rowsTokiAnalyticsTableRowConnection!The table's rows. Without arguments, every row the operation loaded.
Lists referral actions in the period (all time without dates), newest first, as the All referral actions table. Each row is a Link click, or an Order made once the friend ordered with the referral discount, with the referrer's name, email and membership, the discount code, and the order ID and revenue.
startDateStringStart of the period, as an ISO 8601 date-time.
endDateStringEnd of the period, as an ISO 8601 date-time.
forAllShopsBooleantrue includes all your stores instead of only the current one. Some stats and tables always cover all your stores and ignore it.
A table from the Analytics page, as columns and rows.
idIDIdentifies the table, such as top-referrers.
titleStringThe table's title on the Analytics page.
columns[TokiAnalyticsTableColumns!]!The table's columns, in display order.
rowsTokiAnalyticsTableRowConnection!The table's rows. Without arguments, every row the operation loaded.
Returns the Referrals made by membership holders table: referred orders in each month of the last three months, with a row for each referrer membership and No Membership for referrers who hold none.
forAllShopsBooleantrue includes all your stores instead of only the current one.
A table from the Analytics page, as columns and rows.
idIDIdentifies the table, such as top-referrers.
titleStringThe table's title on the Analytics page.
columns[TokiAnalyticsTableColumns!]!The table's columns, in display order.
rowsTokiAnalyticsTableRowConnection!The table's rows. Without arguments, every row the operation loaded.
Returns the Tier Growth table: how many members entered each membership in each month of the last three months, one row per membership in tier order.
forAllShopsBooleantrue includes all your stores instead of only the current one.
A table from the Analytics page, as columns and rows.
idIDIdentifies the table, such as top-referrers.
titleStringThe table's title on the Analytics page.
columns[TokiAnalyticsTableColumns!]!The table's columns, in display order.
rowsTokiAnalyticsTableRowConnection!The table's rows. Without arguments, every row the operation loaded.
Returns the Tiers Overview table: each membership's current number of members and the revenue from its members' orders, in tier order.
forAllShopsBooleantrue includes all your stores instead of only the current one.
A table from the Analytics page, as columns and rows.
idIDIdentifies the table, such as top-referrers.
titleStringThe table's title on the Analytics page.
columns[TokiAnalyticsTableColumns!]!The table's columns, in display order.
rowsTokiAnalyticsTableRowConnection!The table's rows. Without arguments, every row the operation loaded.
Returns the Paid Memberships Overview tables, one for each active paid membership and billing interval, with a column per day, week or month and the rows Total, New + Renewals, Renewed, New and Churned. Each date cell's value is an object with count and revenue, the count times the plan's price. Without both startDate and endDate, the tables cover six periods up to endDate or now.
startDateStringStart of the period, as an ISO 8601 date-time.
endDateStringEnd of the period, as an ISO 8601 date-time.
forAllShopsBooleantrue includes all your stores instead of only the current one. Some stats and tables always cover all your stores and ignore it.
typeTokiAnalyticsPaidMembershipsOverviewTablesTypeHow much time each column covers. Defaults to months.
daysweeksmonthsA table from the Analytics page, as columns and rows.
idIDIdentifies the table, such as top-referrers.
titleStringThe table's title on the Analytics page.
columns[TokiAnalyticsTableColumns!]!The table's columns, in display order.
rowsTokiAnalyticsTableRowConnection!The table's rows. Without arguments, every row the operation loaded.
Lists manual balance adjustments in your default store credit in the period (all time without dates), newest first, as the Manually Given table: the member's email, the amount in points, your description and the date. Debits are included too, also as positive amounts, and the table covers all your stores.
startDateStringStart of the period, as an ISO 8601 date-time.
endDateStringEnd of the period, as an ISO 8601 date-time.
forAllShopsBooleantrue includes all your stores instead of only the current one. Some stats and tables always cover all your stores and ignore it.
A table from the Analytics page, as columns and rows.
idIDIdentifies the table, such as top-referrers.
titleStringThe table's title on the Analytics page.
columns[TokiAnalyticsTableColumns!]!The table's columns, in display order.
rowsTokiAnalyticsTableRowConnection!The table's rows. Without arguments, every row the operation loaded.