CINXE.COM

<!doctype html> <html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-metrics/create" data-has-hydrated="false"> <head> <meta charset="UTF-8"> <meta name="generator" content="Docusaurus v3.5.2"> <title data-rh="true">Creating Custom Metrics | Statsig Docs</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://docs.statsig.com/img/docs_meta_q3_2023.png"><meta data-rh="true" name="twitter:image" content="https://docs.statsig.com/img/docs_meta_q3_2023.png"><meta data-rh="true" property="og:url" content="https://docs.statsig.com/metrics/create"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Creating Custom Metrics | Statsig Docs"><meta data-rh="true" name="description" content="Custom metrics are computed by Statsig from your raw events. To create custom metrics, navigate to Metrics from the left-hand navigation panel, then to the Metrics Catalog tab. Tap on the Create button."><meta data-rh="true" property="og:description" content="Custom metrics are computed by Statsig from your raw events. To create custom metrics, navigate to Metrics from the left-hand navigation panel, then to the Metrics Catalog tab. Tap on the Create button."><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://docs.statsig.com/metrics/create"><link data-rh="true" rel="alternate" href="https://docs.statsig.com/metrics/create" hreflang="en"><link data-rh="true" rel="alternate" href="https://docs.statsig.com/metrics/create" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://JOWHDNMZRN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="Statsig Docs" href="/opensearch.xml"> <script>!function(e,t,n,a){e[a]=e[a]||[],e[a].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var r=t.getElementsByTagName(n)[0],o=t.createElement(n);o.async=!0,o.src="https://www.googletagmanager.com/gtm.js?id=GTM-NRDCWNF";var c=t.querySelector("[nonce]");c&&o.setAttribute("nonce",c.nonce||c.getAttribute("nonce")),r.parentNode.insertBefore(o,r)}(window,document,"script","dataLayer")</script> <script async defer="defer" src="https://www.googletagmanager.com/gtag/js?id=G-EM5RHE1RHW"></script> <script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-EM5RHE1RHW")</script> <script src="https://www.statsig.com/js/single-id.js" onload="setupStatsigSingleId(&#39;docs&#39;)"></script> <script src="https://cdn.jsdelivr.net/npm/@statsig/js-client@3/build/statsig-js-client+session-replay+web-analytics.min.js?apikey=client-XlqSMkAavOmrePNeWfD0fo2cWcjxkZ0cJZz64w7bfHX"></script> <script>window.statsigTier="production"</script> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&amp;display=swap"> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&amp;display=swap"> <script src="/js/rapidoc-min.js"></script> <script src="https://cdn.koala.live/v1/daniel/sdk.js"></script> <script src="/js/koala.js"></script> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css" integrity="sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM" crossorigin="anonymous"><link rel="stylesheet" href="/assets/css/styles.9b3dcac6.css"> <script src="/assets/js/runtime~main.aca2fdd5.js" defer="defer"></script> <script src="/assets/js/main.9cacfc0c.js" defer="defer"></script> </head> <body class="navigation-with-keyboard"> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();t(null!==e?e:"light")}(),function(){try{const n=new URLSearchParams(window.location.search).entries();for(var[t,e]of n)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/logo-new.svg" alt="Statsig" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/img/logo_white.svg" alt="Statsig" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div><b class="navbar__title text--truncate"></b></a><div class="navbarSearchContainer_Bca1"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20" aria-hidden="true"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div><div class="navbar__item"><button class="signupCTA CTA" onclick='window.open("https://console.statsig.com","_blank").focus()'>Get Started</button></div></div><div class="navbar__items navbar__items--right"><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)" aria-live="polite"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0"><div class="docsWrapper_hBAB"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docRoot_UBD9"><aside class="theme-doc-sidebar-container docSidebarContainer_YfHR"><div class="sidebarViewport_aRkj"><div class="sidebar_njMd"><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--active">New to Statsig?</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item doc-icon sidebar-icon"><a class="menu__link" tabindex="0" href="/">Overview</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed rocket-icon sidebar-icon"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/guides/first-feature">Quickstart Guides</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed lightbulb-icon sidebar-icon"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/understanding-platform">Core Concepts &amp; Setup</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed doc-icon sidebar-icon"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/sdks/getting-started">SDKs &amp; Frameworks</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed key-icon sidebar-icon"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/http-api">APIs</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed integrations-icon sidebar-icon"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/integrations/introduction">Integrations</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item data-icon sidebar-icon"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" role="button" aria-expanded="true" tabindex="0" href="/metrics/101">Data &amp; Metrics</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-3 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/metrics/101">Metrics 101 - Overview</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/metrics/ingest">Ingesting Metrics</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/metrics/pulse">Pulse Metrics</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/metrics/local-metrics">Local Metrics</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/metrics/console">Metrics Dashboard</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/metrics/health-checks">Health</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/metrics/create">Creating Custom Metrics</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/metrics/custom-dau">Custom DAU Metric Creation</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/metrics/archiving-metrics">Archiving and Deleting Metrics</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/metrics/create-metric-tags">Creating Metric Tags</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/metrics/metric-alerts">Metric Alerts</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/metrics/user">User Accounting Metrics</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/metrics/create-user-funnels">Funnel Metrics</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/metrics/verified">Verified Metrics</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/metrics/autogenerated">SDK auto metrics</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/guides/statsig-id-resolver">Statsig ID Resolver</a></li></ul></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item question-icon sidebar-icon"><a class="menu__link" tabindex="0" href="/faq">FAQs</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link">Products</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed feature-icon sidebar-icon"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/feature-flags/working-with">Feature Flags</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed xp-icon sidebar-icon"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/experiments-plus">Experimentation</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed chart-icon sidebar-icon"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/product-analytics/overview">Product Analytics</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed web-icon sidebar-icon"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/webanalytics/overview">Web Analytics</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed play-icon sidebar-icon"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/session-replay/overview">Session Replay</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed whn-icon sidebar-icon"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/statsig-warehouse-native/introduction">Warehouse Native</a></div></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link">Management &amp; Admin</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed team-icon sidebar-icon"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/access-management/introduction">Workspace Management</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed template-icon sidebar-icon"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/org-admin/organization_policies">Collaboration</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed admin-icon sidebar-icon"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" tabindex="0" href="/compliance/introduction">Privacy</a><button aria-label="Expand sidebar category &#x27;Privacy&#x27;" aria-expanded="false" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed infra-icon sidebar-icon"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" tabindex="0" href="/infrastructure/introduction">Infrastructure Operations</a><button aria-label="Expand sidebar category &#x27;Infrastructure Operations&#x27;" aria-expanded="false" type="button" class="clean-btn menu__caret"></button></div></li></ul></li></ul></nav></div></div></aside><main class="docMainContainer_TBSr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">New to Statsig?</span><meta itemprop="position" content="1"></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">Data &amp; Metrics</span><meta itemprop="position" content="2"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">Creating Custom Metrics</span><meta itemprop="position" content="3"></li></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Creating Custom Metrics</h1></header><p>Custom metrics are computed by Statsig from your raw events. To create custom metrics, navigate to <strong>Metrics</strong> from the left-hand navigation panel, then to the <strong>Metrics Catalog</strong> tab. Tap on the <strong>Create</strong> button.</p> <p><img decoding="async" loading="lazy" src="https://github.com/statsig-io/docs/assets/101903926/4148f4b8-f9e4-4a37-98df-35663650d76f" alt="Screen Shot 2023-09-12 at 12 53 05 PM" class="img_ev3q"></p> <p>Statsig supports five types of custom metrics:</p> <table><thead><tr><th>Metric Type</th><th>Description</th><th>Examples</th></tr></thead><tbody><tr><td>Event Count</td><td><strong>Total count of events</strong> filtered by the <em>value</em> and <em>metadata</em> properties of an event type</td><td><strong>Add to Cart</strong> event filtered by category type</td></tr><tr><td>User Count</td><td><strong>Number of unique users</strong> that trigger events filtered by the <em>value</em> and <em>metadata</em> of an event type</td><td><strong>Active Users</strong> based on their views of a product category</td></tr><tr><td>Aggregation</td><td><strong>Sum or Average</strong> of the <em>value</em> or <em>metadata</em> property of an event type</td><td><strong>Total Revenue</strong></td></tr><tr><td>Ratio</td><td><strong>Rates</strong> (e.g. cart conversion rate, purchase rate), <strong>Normalized Values</strong> (e.g. sessions per user, items per cart)</td><td><strong>Cart Conversion Rate</strong>, <strong>Sessions per User</strong></td></tr><tr><td>Funnel</td><td><strong>Funnels</strong>- funnel of multiple events with conversion tracking</td><td><strong>Sign-up Funnel</strong>, <strong>Checkout Funnel</strong></td></tr></tbody></table> <p>Statsig computes custom metrics on a per day basis for your <strong>Metrics</strong> dashboard, and rolled up for the duration of the experiment in your <strong>Pulse Results</strong> delivered with your Feature Gates and Experiments. After you create a custom metric, it will not populate until the next day (and will not backfill to previous days). Statsig will only calculate it moving forward from the creation date.</p> <p>Statsig offers a feature allowing users to set a daily <strong>max cap</strong> for specific metrics. With this capability, users can define maximum caps for various unit types associated with a metric. Any value surpassing the set cap will automatically be adjusted to match it. For instance, if you determine that purchases greater than $10,000 per day on your E-commerce platform should not skew analysis, any transaction exceeding this threshold will be adjusted downward to this limit, ensuring the integrity of your experiment analysis. Capped metrics are available for event count and aggregation (sum) metric types.</p> <p>When creating your custom metric, you can preview a given custom metric&#x27;s value at the bottom of the page. To view metric preview, tap <strong>View Output Preview</strong> to see what your metric would have looked like based on its components’ values over the last 7 days, in both chart and table form.</p> <p><img decoding="async" loading="lazy" src="https://github.com/statsig-io/docs/assets/101903926/0869e1bf-8fea-407e-8a5f-8b97860b3867" alt="Screen Shot 2023-09-13 at 10 30 58 AM" class="img_ev3q"></p> <h2 class="anchor anchorWithStickyNavbar_LWe7" id="examples">Examples<a href="#examples" class="hash-link" aria-label="Direct link to Examples" title="Direct link to Examples">​</a></h2> <h3 class="anchor anchorWithStickyNavbar_LWe7" id="1-event-count-metrics">1. Event Count Metrics<a href="#1-event-count-metrics" class="hash-link" aria-label="Direct link to 1. Event Count Metrics" title="Direct link to 1. Event Count Metrics">​</a></h3> <p>Here&#x27;s an example of setting up a custom event metric to count the <strong>number of add_to_cart events</strong> filtered by a metadata property called <em>value</em>, which carries the price of the item added to the cart. As this example specifies the ID Type as <em>userID</em>, Statsig will compute this metric as part of the test group that the corresponding user is assigned to in an experiment.</p> <p><img decoding="async" loading="lazy" src="https://github.com/statsig-io/docs/assets/101903926/95489e9b-36f2-4704-9970-da675a8a3d2e" alt="Screen Shot 2023-09-12 at 1 11 23 PM" class="img_ev3q"></p> <p>If you select the ID Type as <em>stableID</em>, Statsig will compute this metric in the test group that the corresponding device is assigned to in an experiment. When you select more than ID Type, Statsig will compute this metric for each type of ID Type that you specify.</p> <h3 class="anchor anchorWithStickyNavbar_LWe7" id="2-user-count-metrics">2. User Count Metrics<a href="#2-user-count-metrics" class="hash-link" aria-label="Direct link to 2. User Count Metrics" title="Direct link to 2. User Count Metrics">​</a></h3> <p>The example below creates a metric to count the <strong>number of unique users</strong> who viewed a product in the <em>toys</em> category that was priced under $10.</p> <p><img decoding="async" loading="lazy" src="https://github.com/statsig-io/docs/assets/101903926/ae270d11-d3de-4f34-85e5-a67ad9c7cd9e" alt="Screen Shot 2023-09-12 at 1 16 11 PM" class="img_ev3q"></p> <p><strong>Time Window</strong></p> <p>Two time window options are available for user count metrics</p> <ul> <li>Daily Participation Rate: It counts the total number of days that a user has the selected event, divided by the number of days the user is in the experiment. The result is a metric value between 0 and 1, which represents the probably of a user having the event on a daily basis. It works best for events that are expected to occur repeatedly for a given user.</li> <li>One Time Event: This checks if a user has the selected event at least once during their time in the experiment. The result is a binary metric with value 0 or 1 for each user. This is ideal for events that are only expected once per user, such as sign up events.</li> <li>Custom Attribution Window: Allows you to define a custom window after exposure to count an event towards a metric calculation.</li> </ul> <h3 class="anchor anchorWithStickyNavbar_LWe7" id="3-aggregation-metrics">3. Aggregation Metrics<a href="#3-aggregation-metrics" class="hash-link" aria-label="Direct link to 3. Aggregation Metrics" title="Direct link to 3. Aggregation Metrics">​</a></h3> <p>The example below shows a <strong>Total Revenue</strong> metric that sums the <em>value</em> associated with all purchase events.</p> <p><img decoding="async" loading="lazy" src="https://github.com/statsig-io/docs/assets/101903926/f0d4d21b-08ae-405d-a156-4d29f96ab298" alt="Screen Shot 2023-09-12 at 1 24 49 PM" class="img_ev3q"></p> <p><strong>[In Beta] Currency Sum</strong></p> <p>eCommerce customers can span multiple currency types and typically log payments in the currency and amounts the user actually pays. Currency sums allow for payments that are recorded in different currencies to be converted to one common currency. You will need to log two pieces of metadata in your event - a currency code and a value. Example metadata - <code>_{&quot;currency_code&quot;: &quot;USD&quot;, &quot;currency_value&quot;: 123.45}_</code></p> <p>Statsig supports currency sums upon request. Please ask in <a href="https://statsig.com/slack" target="_blank" rel="noopener noreferrer">Slack</a>.</p> <h3 class="anchor anchorWithStickyNavbar_LWe7" id="4-ratio-metrics">4. Ratio Metrics<a href="#4-ratio-metrics" class="hash-link" aria-label="Direct link to 4. Ratio Metrics" title="Direct link to 4. Ratio Metrics">​</a></h3> <p>The example below shows the creation of a <strong>Cart Conversion Rate</strong> metric. Here we use the unique users who triggered the <em>purchase event</em> as the numerator and the unique users who triggered the <em>add to cart</em> event in the denominator. Note that when calculating the numerator, we filter to only include users who also had the denominator event in the same day. So in the case of this metric, a user who only has <em>purchase event</em> on a given day without an <em>add to cart</em> on that same day will not count towards the numerator.</p> <p><img decoding="async" loading="lazy" src="https://github.com/statsig-io/docs/assets/101903926/9f8a671e-ac1f-4e2f-92cb-d154e0daecac" alt="Screen Shot 2023-09-12 at 1 29 15 PM" class="img_ev3q"></p> <p>This pattern also applies to <strong>click through rates (CTR)</strong> in any part of a step-wise product journey (aka funnels). Statsig recommends using unique users in both the numerator and denominator for defining these kinds of metrics. As an example, when a user reloads a page multiple times but clicks only once, this corresponds to a 100% CTR (1 out of 1). Similarly, a user who loads a page once but clicks multiple times on a button should only count as 1 out of 1. This also solves for cases where users see an important button such as &quot;Sign-up&quot; multiple times a day, and we would still consider it a success if they click just once.</p> <p>The example below shows creating a metric for <strong>Items per Cart</strong>. You can track the number of unique items added to a cart if you log an <em>add_to_cart</em> event for each item. For the numerator, select total event count. For the denominator, select unique users. As this metric is computed daily and only for users with a non-zero denominator, this metric can generate ratios such as 1/1, 2/1, 2/1, and 5/1 for individual users. When aggregated, this translates to 10/4 = 2.5 items per cart on average per day.</p> <p><img decoding="async" loading="lazy" src="https://github.com/statsig-io/docs/assets/101903926/cf6e6777-a154-4eeb-9a2d-81893810a31d" alt="Screen Shot 2023-09-12 at 1 30 28 PM" class="img_ev3q"></p> <div class="theme-admonition theme-admonition-info admonition_xJq3 alert alert--info"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>A Word of Caution</div><div class="admonitionContent_BuS1"><p>In experimentation, ratio metrics are a frequent source of misleading information. It&#x27;s possible to see an increase in <strong>click through rate</strong> alongside a net <em>decrease</em> in total clicks (the opposite may also happen). This situation can occur if the number of unique users viewing a button (denominator) decreases. As a best practice, Statsig recommends tracking the numerator and denominator as independent metrics when monitoring ratio indicator. Ratio metrics are often subject to statistical noise and can be tricky to use for obtaining a statistically significant result. In addition, for the numerator in ratios, we exclude units which don&#x27;t have a denominator value.</p></div></div> <h3 class="anchor anchorWithStickyNavbar_LWe7" id="5-funnel-metrics">5. Funnel Metrics<a href="#5-funnel-metrics" class="hash-link" aria-label="Direct link to 5. Funnel Metrics" title="Direct link to 5. Funnel Metrics">​</a></h3> <p>You can create a custom funnel metric, from either the Custom Metrics Creation wizard in the Metrics Catalog or via the <strong>Charts</strong> tab.</p> <p><img decoding="async" loading="lazy" src="https://github.com/statsig-io/docs/assets/101903926/86914826-b8ce-4b4b-9514-39f31d05687a" alt="Screen Shot 2023-09-12 at 1 33 10 PM" class="img_ev3q"></p> <h3 class="anchor anchorWithStickyNavbar_LWe7" id="components-of-funnel-metrics">Components of Funnel Metrics<a href="#components-of-funnel-metrics" class="hash-link" aria-label="Direct link to Components of Funnel Metrics" title="Direct link to Components of Funnel Metrics">​</a></h3> <p>Funnel metrics have a few components:</p> <ol> <li><strong>Lineage</strong>: Surfaces the events used to generate the funnel</li> <li><strong>Metric Value</strong>: Metric value represents the overall funnel conversion rate, or the percentage of users who complete a funnel (trigger the end event) relative to all users who start the funnel (trigger the starting event)</li> <li><strong>Conversion rate between stages</strong>: This set of metrics track the percentage of users who triggered an event N relative to all users that triggered event N-1 in the funnel</li> </ol> <p><img decoding="async" loading="lazy" src="https://user-images.githubusercontent.com/101903926/172446711-5511e394-b353-4d38-97f1-1b681b67042b.png" alt="Screen Shot 2022-06-07 at 10 34 58 AM" class="img_ev3q"></p> <p>After funnels are created and populated, you can view your funnel metric much like any other metric in Pulse. Additionally, you can expand the funnel metric to view Pulse performance at each step in the funnel.</p> <p>In the example below, the <strong>Square</strong> variant shows a lift in the <strong>overall funnel conversion rate</strong>. Expanding the metrics to examine the entire funnel reveals two key insights:</p> <ul> <li>Both the <strong>Square</strong> and <strong>Circle</strong> variants show a lift in top-of-funnel DAU (<em>Land Page View Start DAU</em>). However, only the <strong>Square</strong> variant shows statistically significant increase in end-of-funnel DAU (<em>Purchase Event End DAU</em>).</li> <li>The overall funnel conversion rate improvement for <strong>Square</strong> is primarily due to the higher conversion from <em>Checkout Event</em> to <em>Purchase Event</em> stages in the funnel.</li> </ul> <p><img decoding="async" loading="lazy" src="https://user-images.githubusercontent.com/90343952/148440643-8e8a24bd-934d-4100-a15a-abcbcc4bb11c.png" alt="image" class="img_ev3q"></p> <h3 class="anchor anchorWithStickyNavbar_LWe7" id="custom-metrics--dimensions">Custom Metrics &amp; Dimensions<a href="#custom-metrics--dimensions" class="hash-link" aria-label="Direct link to Custom Metrics &amp; Dimensions" title="Direct link to Custom Metrics &amp; Dimensions">​</a></h3> <p>For Custom Metrics that are composed of a single event (event count/ event dau, aggregation, etc.), the dimensions of the source event will be automatically pulled through into the Custom Metric and be exposed as dimensions of that Custom Metric. However, if your Custom Metric is composed of 2+ different events, any associated dimension(s) of the source input events will <em>not</em> be pulled through as dimensions of the Custom Metric and are also not queryable today via the &quot;Explore&quot; tab in Pulse Results.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="row margin-top--sm theme-doc-footer-edit-meta-row"><div class="col"><a href="https://github.com/statsig-io/docs/edit/main/docs/metrics/create.md" target="_blank" rel="noopener noreferrer" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_JAkA"><span class="theme-last-updated">Last updated<!-- --> on <b><time datetime="2024-11-15T17:41:49.000Z" itemprop="dateModified">Nov 15, 2024</time></b></span></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/metrics/health-checks"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Health</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/metrics/custom-dau"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Custom DAU Metric Creation</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#examples" class="table-of-contents__link toc-highlight">Examples</a><ul><li><a href="#1-event-count-metrics" class="table-of-contents__link toc-highlight">1. Event Count Metrics</a></li><li><a href="#2-user-count-metrics" class="table-of-contents__link toc-highlight">2. User Count Metrics</a></li><li><a href="#3-aggregation-metrics" class="table-of-contents__link toc-highlight">3. Aggregation Metrics</a></li><li><a href="#4-ratio-metrics" class="table-of-contents__link toc-highlight">4. Ratio Metrics</a></li><li><a href="#5-funnel-metrics" class="table-of-contents__link toc-highlight">5. Funnel Metrics</a></li><li><a href="#components-of-funnel-metrics" class="table-of-contents__link toc-highlight">Components of Funnel Metrics</a></li><li><a href="#custom-metrics--dimensions" class="table-of-contents__link toc-highlight">Custom Metrics &amp; Dimensions</a></li></ul></li></ul></div></div></div></div></main></div></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/">Getting Started</a></li><li class="footer__item"><a class="footer__link-item" href="/faq">FAQ</a></li></ul></div><div class="col footer__col"><div class="footer__title">More</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://statsig.com" target="_blank" rel="noopener noreferrer" class="footer__link-item">Statsig Home<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://statsig.com/blog" target="_blank" rel="noopener noreferrer" class="footer__link-item">Blog<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://statsig.com/slack" target="_blank" rel="noopener noreferrer" class="footer__link-item">Slack Community<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://github.com/statsig-io" target="_blank" rel="noopener noreferrer" class="footer__link-item">Code<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright (c) 2024 Statsig, Inc. | Thanks Docusaurus</div></div></div></footer></div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10