{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Class: AnalyticsApi"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/readme"},"children":["PERS SDK - v2.3.26"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/modules"},"children":["Exports"]}," / AnalyticsApi"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"class-analyticsapi","__idx":0},"children":["Class: AnalyticsApi"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Platform-Agnostic Analytics API Client"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Handles analytics operations using the PERS backend."," ","Uses @explorins/pers-shared DTOs for consistency with backend."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"table-of-contents","__idx":1},"children":["Table of contents"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"constructors","__idx":2},"children":["Constructors"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/analyticsapi#constructor"},"children":["constructor"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"methods","__idx":3},"children":["Methods"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/analyticsapi#gettransactionanalytics"},"children":["getTransactionAnalytics"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/analyticsapi#getcampaignclaimanalytics"},"children":["getCampaignClaimAnalytics"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/analyticsapi#getredemptionredeemanalytics"},"children":["getRedemptionRedeemAnalytics"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/analyticsapi#getuseranalytics"},"children":["getUserAnalytics"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/analyticsapi#getuserranking"},"children":["getUserRanking"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/analyticsapi#getbusinessranking"},"children":["getBusinessRanking"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/analyticsapi#getretentionanalytics"},"children":["getRetentionAnalytics"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/analyticsapi#gettaganalytics"},"children":["getTagAnalytics"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"constructors-1","__idx":4},"children":["Constructors"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"constructor","__idx":5},"children":["constructor"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["new AnalyticsApi"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apiClient"]},"): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/analyticsapi"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AnalyticsApi"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters","__idx":6},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apiClient"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/persapiclient"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PersApiClient"]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns","__idx":7},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/analyticsapi"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AnalyticsApi"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in","__idx":8},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/analytics/api/analytics-api.ts#L29"},"children":["analytics/api/analytics-api.ts:29"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"methods-1","__idx":9},"children":["Methods"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"gettransactionanalytics","__idx":10},"children":["getTransactionAnalytics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getTransactionAnalytics"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionAnalyticsResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ADMIN: Get transaction analytics with filtering and aggregation"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-1","__idx":11},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionAnalyticsRequestDTO"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-1","__idx":12},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionAnalyticsResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-1","__idx":13},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/analytics/api/analytics-api.ts#L38"},"children":["analytics/api/analytics-api.ts:38"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getcampaignclaimanalytics","__idx":14},"children":["getCampaignClaimAnalytics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getCampaignClaimAnalytics"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CampaignClaimAnalyticsResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ADMIN: Get campaign claim analytics with aggregation (charts, metrics, grouping)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This endpoint is for aggregated analytics only (groupBy/metrics)."," ","For enriched list data with nested objects, use campaign.getClaims() instead."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-2","__idx":15},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CampaignClaimAnalyticsRequestDTO"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-2","__idx":16},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CampaignClaimAnalyticsResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const response = await analyticsApi.getCampaignClaimAnalytics({\n  filters: { status: 'COMPLETED' },\n  groupBy: ['campaignId'],\n  metrics: ['count'],\n  sortBy: 'count',\n  sortOrder: SortOrder.DESC,\n  limit: 10\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const response = await analyticsApi.getCampaignClaimAnalytics({\n  groupBy: ['month', 'status'],\n  metrics: ['count'],\n  sortBy: 'month',\n  sortOrder: SortOrder.DESC,\n  startDate: new Date('2026-01-01'),\n  endDate: new Date('2026-12-31')\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-2","__idx":17},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/analytics/api/analytics-api.ts#L72"},"children":["analytics/api/analytics-api.ts:72"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getredemptionredeemanalytics","__idx":18},"children":["getRedemptionRedeemAnalytics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getRedemptionRedeemAnalytics"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RedemptionRedeemAnalyticsResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ADMIN: Get redemption redeem analytics with aggregation (charts, metrics, grouping)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This endpoint is for aggregated analytics only (groupBy/metrics)."," ","For enriched list data with nested objects, use redemption.getRedeems() instead."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-3","__idx":19},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RedemptionRedeemAnalyticsRequestDTO"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-3","__idx":20},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RedemptionRedeemAnalyticsResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const response = await analyticsApi.getRedemptionRedeemAnalytics({\n  groupBy: ['redemptionId'],\n  metrics: ['count'],\n  sortBy: 'count',\n  sortOrder: SortOrder.DESC,\n  limit: 10\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const response = await analyticsApi.getRedemptionRedeemAnalytics({\n  groupBy: ['month', 'status'],\n  metrics: ['count'],\n  sortBy: 'month',\n  sortOrder: SortOrder.DESC,\n  startDate: new Date('2026-01-01'),\n  endDate: new Date('2026-12-31')\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const response = await analyticsApi.getRedemptionRedeemAnalytics({\n  filters: { status: 'COMPLETED' },\n  groupBy: ['businessId'],\n  metrics: ['count'],\n  sortBy: 'count',\n  sortOrder: SortOrder.DESC\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-3","__idx":21},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/analytics/api/analytics-api.ts#L116"},"children":["analytics/api/analytics-api.ts:116"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getuseranalytics","__idx":22},"children":["getUserAnalytics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getUserAnalytics"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request?"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UserAnalyticsResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ADMIN: Get user analytics with engagement metrics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns aggregated user statistics including engagement rate, active users,"," ","transaction metrics, and per-active-user averages (more accurate than all-user averages)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Request structure matches TransactionAnalytics and CampaignClaimAnalytics for consistency:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["filters object for business-specific scoping"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["startDate/endDate at root level for date range filtering"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-4","__idx":23},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UserAnalyticsRequestDTO"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Analytics request with optional filters and date range"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-4","__idx":24},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UserAnalyticsResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Aggregated user metrics with per-user and per-active-user averages"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const analytics = await analyticsApi.getUserAnalytics({});\nconsole.log(`Total users: ${analytics.totalUsers}`);\nconsole.log(`Active users: ${analytics.activeUsers}`);\nconsole.log(`Engagement rate: ${analytics.engagementRate}%`);\n\n// Per-user averages (includes inactive users)\nconsole.log(`Avg transactions per user: ${analytics.averageTransactionsPerUser}`);\n\n// Per-active-user averages (only engaged users - more useful!)\nconsole.log(`Avg transactions per active user: ${analytics.averageTransactionsPerActiveUser}`);\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const analytics = await analyticsApi.getUserAnalytics({\n  startDate: new Date('2026-01-01'),\n  endDate: new Date('2026-01-31')\n});\nconsole.log(`January metrics:`);\nconsole.log(`Active users: ${analytics.activeUsers}`);\nconsole.log(`New users: ${analytics.newUsers}`);\nconsole.log(`Date range applied: ${analytics.metadata.dateRange?.startDate} - ${analytics.metadata.dateRange?.endDate}`);\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const analytics = await analyticsApi.getUserAnalytics({\n  filters: { businessId: 'biz-123' },\n  startDate: new Date('2026-01-01'),\n  endDate: new Date('2026-12-31')\n});\nconsole.log(`Business customer engagement in 2026:`);\nconsole.log(`Active customers: ${analytics.activeUsers}`);\nconsole.log(`Avg claims per active customer: ${analytics.averageClaimsPerActiveUser.toFixed(2)}`);\nconsole.log(`Customer engagement rate: ${analytics.engagementRate.toFixed(1)}%`);\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-4","__idx":25},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/analytics/api/analytics-api.ts#L172"},"children":["analytics/api/analytics-api.ts:172"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getuserranking","__idx":26},"children":["getUserRanking"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getUserRanking"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request?"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UserRankingAnalyticsResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ADMIN: Get user transaction ranking with enriched user data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns ranked list of users with full user details and transaction metrics."," ","Data enrichment happens via efficient SQL JOINs + UNION (handles legacy transactions)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use Cases:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Admin leaderboards showing top users by activity"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["User engagement analysis with full user context"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Identifying power users for campaigns"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-5","__idx":27},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UserRankingAnalyticsRequestDTO"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Ranking request with filters, sorting, and limit"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-5","__idx":28},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UserRankingAnalyticsResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ranked list with user details (email, externalUserId) and transaction metrics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const ranking = await analyticsApi.getUserRanking({\n  sortBy: 'totalTransactions',\n  sortOrder: SortOrder.DESC,\n  limit: 50\n});\n\nranking.results.forEach((user, index) => {\n  console.log(`#${index + 1}: ${user.email || user.externalUserId} - ${user.totalTransactions} transactions`);\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const ranking = await analyticsApi.getUserRanking({\n  filters: { tokenType: 'STAMP' },\n  sortBy: 'tokenSpent',\n  sortOrder: SortOrder.DESC,\n  limit: 20\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const ranking = await analyticsApi.getUserRanking({\n  filters: { \n    businessId: 'business-uuid-here',\n    tokenType: 'CREDIT'\n  },\n  sortBy: 'totalTransactions',\n  sortOrder: SortOrder.DESC,\n  limit: 100,\n  startDate: new Date('2026-01-01'),\n  endDate: new Date('2026-12-31')\n});\nconsole.log(`Top ${ranking.totalUsers} users for business in 2026`);\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-5","__idx":29},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/analytics/api/analytics-api.ts#L229"},"children":["analytics/api/analytics-api.ts:229"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getbusinessranking","__idx":30},"children":["getBusinessRanking"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getBusinessRanking"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request?"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BusinessRankingAnalyticsResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ADMIN: Get business transaction ranking with enriched business data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns ranked list of businesses with full business details and transaction metrics."," ","Data enrichment happens via efficient SQL JOINs + UNION (handles legacy transactions)."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-6","__idx":31},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BusinessRankingAnalyticsRequestDTO"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Ranking request with filters, sorting, and limit"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-6","__idx":32},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BusinessRankingAnalyticsResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ranked list with business details and transaction metrics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const ranking = await analyticsApi.getBusinessRanking({\n  sortBy: 'totalTransactions',\n  sortOrder: SortOrder.DESC,\n  limit: 50\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-6","__idx":33},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/analytics/api/analytics-api.ts#L251"},"children":["analytics/api/analytics-api.ts:251"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getretentionanalytics","__idx":34},"children":["getRetentionAnalytics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getRetentionAnalytics"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request?"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RetentionAnalyticsResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ADMIN: Get monthly user retention analytics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns monthly retention data with active/new/returning users and retention rates."," ","Replaces 13 separate API calls with 1 efficient recursive CTE query."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-7","__idx":35},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RetentionAnalyticsRequestDTO"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Retention analytics request with monthsBack and filters"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-7","__idx":36},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RetentionAnalyticsResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Monthly retention data with user metrics and retention rates"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const retention = await analyticsApi.getRetentionAnalytics({\n  monthsBack: 13\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-7","__idx":37},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/analytics/api/analytics-api.ts#L271"},"children":["analytics/api/analytics-api.ts:271"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"gettaganalytics","__idx":38},"children":["getTagAnalytics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getTagAnalytics"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request?"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TagAnalyticsResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ADMIN: Get tag usage analytics across entities"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Aggregates tag usage across all taggable entities (campaigns, redemptions,"," ","businesses, token metadata, user status types). Perfect for:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Tag autocomplete/suggestions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Tag management dashboards"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Usage analytics"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-8","__idx":39},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TagAnalyticsRequestDTO"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Optional filters for entity types"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-8","__idx":40},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TagAnalyticsResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Aggregated tag usage with per-entity-type breakdown"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const allTags = await analyticsApi.getTagAnalytics();\nconsole.log(`${allTags.totalTags} unique tags, ${allTags.totalUsage} total usages`);\n\n// Use for autocomplete suggestions\nconst suggestions = allTags.tags.map(t => t.tag);\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const filteredTags = await analyticsApi.getTagAnalytics({\n  entityTypes: [TaggableEntityType.CAMPAIGN, TaggableEntityType.BUSINESS]\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const analytics = await analyticsApi.getTagAnalytics();\nanalytics.tags.forEach(({ tag, count, usageByEntityType }) => {\n  console.log(`${tag}: ${count} total`);\n  usageByEntityType.forEach(({ entityType, count }) => {\n    console.log(`  - ${entityType}: ${count}`);\n  });\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-8","__idx":41},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/analytics/api/analytics-api.ts#L318"},"children":["analytics/api/analytics-api.ts:318"]}]}]},"headings":[{"value":"Class: AnalyticsApi","id":"class-analyticsapi","depth":1},{"value":"Table of contents","id":"table-of-contents","depth":2},{"value":"Constructors","id":"constructors","depth":3},{"value":"Methods","id":"methods","depth":3},{"value":"Constructors","id":"constructors-1","depth":2},{"value":"constructor","id":"constructor","depth":3},{"value":"Parameters","id":"parameters","depth":4},{"value":"Returns","id":"returns","depth":4},{"value":"Defined in","id":"defined-in","depth":4},{"value":"Methods","id":"methods-1","depth":2},{"value":"getTransactionAnalytics","id":"gettransactionanalytics","depth":3},{"value":"Parameters","id":"parameters-1","depth":4},{"value":"Returns","id":"returns-1","depth":4},{"value":"Defined in","id":"defined-in-1","depth":4},{"value":"getCampaignClaimAnalytics","id":"getcampaignclaimanalytics","depth":3},{"value":"Parameters","id":"parameters-2","depth":4},{"value":"Returns","id":"returns-2","depth":4},{"value":"Defined in","id":"defined-in-2","depth":4},{"value":"getRedemptionRedeemAnalytics","id":"getredemptionredeemanalytics","depth":3},{"value":"Parameters","id":"parameters-3","depth":4},{"value":"Returns","id":"returns-3","depth":4},{"value":"Defined in","id":"defined-in-3","depth":4},{"value":"getUserAnalytics","id":"getuseranalytics","depth":3},{"value":"Parameters","id":"parameters-4","depth":4},{"value":"Returns","id":"returns-4","depth":4},{"value":"Defined in","id":"defined-in-4","depth":4},{"value":"getUserRanking","id":"getuserranking","depth":3},{"value":"Parameters","id":"parameters-5","depth":4},{"value":"Returns","id":"returns-5","depth":4},{"value":"Defined in","id":"defined-in-5","depth":4},{"value":"getBusinessRanking","id":"getbusinessranking","depth":3},{"value":"Parameters","id":"parameters-6","depth":4},{"value":"Returns","id":"returns-6","depth":4},{"value":"Defined in","id":"defined-in-6","depth":4},{"value":"getRetentionAnalytics","id":"getretentionanalytics","depth":3},{"value":"Parameters","id":"parameters-7","depth":4},{"value":"Returns","id":"returns-7","depth":4},{"value":"Defined in","id":"defined-in-7","depth":4},{"value":"getTagAnalytics","id":"gettaganalytics","depth":3},{"value":"Parameters","id":"parameters-8","depth":4},{"value":"Returns","id":"returns-8","depth":4},{"value":"Defined in","id":"defined-in-8","depth":4}],"frontmatter":{"seo":{"title":"Class: AnalyticsApi"}},"lastModified":"2026-08-21T18:40:55.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sdk-reference/classes/analyticsapi","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}