On this page

Marketing metrics recipes

This article provides recipes to recreate common marketing metrics, such as session totals, bounce rate, and page views, using Event Segmentation or User Sessions charts. Each recipe lists the module setup you need to build one metric.

See also

To combine event and session metrics in one chart, including hybrid formulas such as Revenue per Session, try Metric Explorer (Beta).

Before you start, read the basics of building charts in Amplitude. Some recipes in this article use custom formulas, which the custom formula metrics, syntax, and definitions article explains.

Metric recipes

The examples in this section provide a starting point for setting up each metric. As with other analyses, use filters, group-bys, or segmentation to refine results.

You can also apply the setup instructions for session totals, visitors, page views, bounce rate, entry rate, and exit rate to Data Tables analyses.

Session totals

The session totals metric provides a sum of sessions.

Use the following setup for each module in your User Sessions chart to create the session totals metric:

  • Sessions: Count sessions for all sessions.

    To filter results by a specific domain or URL:

    • Click Filter by and choose Contains Event. Search for the Page Viewed event. Set the count to greater than or equal to one.
    • Click the Filter to add a where clause for your Page URL.
  • Measured as: Total Sessions.

  • Segmented by: All users.

Visitors

The visitors metric counts unique users who trigger a specific event.

Use the following setup for each module in your Event Segmentation chart to create the visitors metric:

  • Events: Page View.

    To filter results by a specific domain or URL:

    • Click Filter by and choose Page URL. Select the checkbox next to your domain and click Apply.
  • Measured as: Uniques.

  • Segmented by: All users.

Sessions per user

The sessions per user metric gives an average count of sessions by unique user.

Use the following setup for each module in your User Sessions chart to create the sessions per user metric:

  • Sessions: Count sessions for all sessions.

To filter results by a specific domain or URL:

  • Click Filter by and choose Contains Event. Search for the Page Viewed event. Set the count to greater than or equal to one.

    • Click Filter to add a where clause for your Page URL.
  • Measured as: Avg Per User.

  • Segmented by: All users.

Average session duration

The average session duration metric gives an average length of sessions.

Use the following setup for each module in your User Sessions chart to create the average session duration metric:

  • Sessions: Count sessions for all sessions.

To filter results by a specific domain or URL:

  • Click Filter by and choose Contains Event. Search for your Page View event. Set the count to greater than or equal to one.

    • Click Filter to add a where clause for your Page URL.
  • Measured as: Avg length (counting in days, hours, minutes).

  • Segmented by: All users.

Page views

The page views metric gives a sum of page views events.

Use the following setup for each module in your Event Segmentation chart to create the page views metric:

  • Events: Page View.

To filter results by a specific domain or URL:

  • Click Filter by and choose Page URL. Select the checkbox next to your domain and click Apply.

  • Measured as: Event Totals.

  • Segmented by: All users.

Page views per session

The page views per session metric gives an average count of Page View events per session.

Use the following setup for each module in your User Sessions chart to create the page views per session metric:

  • Sessions: Count events performed within sessions for all sessions.
    • By Event Count of the Page View event.

To filter results by a specific domain or URL:

  • Click Filter by and choose Contains Event. Search for the Page Viewed event. Set the count to greater than or equal to one.

    • Click Filter to add a where clause for your Page URL.
  • Measured as: Avg events per session.

  • Segmented by: All users.

Bounce rate

The bounce rate metric compares the count of sessions with a single Page View event to the total number of sessions, as a percentage.

Use the following setup for each module in your User Sessions chart to create the bounce rate metric:

  • Sessions: Count sessions.
    • A: All sessions.
      • where Contains Event = Page Viewed with a count of one.
    • B: All sessions.

To filter results by a specific domain or URL of each session:

  • Click Filter by and choose Contains Event for session B. Search for the Page Viewed event. Set the count to greater than or equal to one for session B.

    • Click Filter to add a where clause for your Page URL for sessions A and B.
  • Measured as: Formula %:SESSIONTOTALS(A)/SESSIONTOTALS(B).

  • Segmented by: All users.

This User Sessions chart calculates the 30-day bounce rate for the Page URL ampli.com/home. The bounce rate for March 4th was 97.3 percent.

The bounce rate for ampli.com/home hovers in the low-to-high 90s across the month, reaching 97.3% on March 4.
30-day bounce rate for ampli.com/home
DateAll Users
Feb 21, 202696.9
Feb 22, 202698.1
Feb 23, 202696.7
Feb 24, 202697
Feb 25, 202697.6
Feb 26, 202698.2
Feb 27, 202697.4
Feb 28, 202690.2
Mar 1, 202698
Mar 2, 202697.3
Mar 3, 202693
Mar 4, 202697.3
Mar 5, 202691.2
Mar 6, 202696.8
Mar 7, 202697.6
Mar 8, 202696.9
Mar 9, 202695.4
Mar 10, 202697.1
Mar 11, 202697.3
Mar 12, 202696.6
Mar 13, 202696.6
Mar 14, 202696
Mar 15, 202698.2
Mar 16, 202695.9
Mar 17, 202693.1
Mar 18, 202696
Mar 19, 202697.5
Mar 20, 202689.9
Mar 21, 202695
Mar 22, 202698

The chart plots the daily bounce rate for ampli.com/home over 30 days, where bounce rate is the share of sessions that contain exactly one Page View. The line stays in the low-to-high 90s all month and peaks at 97.3 percent on March 4, so almost every session that reaches this page views only that page and leaves. A rate this high and this flat flags a landing page worth investigating. The dashed tail marks the most recent day, whose data is still provisional.

Entry rate

The entry rate metric compares sessions with a Page View event grouped by the first property value of the specified event property to the total number of sessions, as a percentage.

Use the following setup for each module in your User Sessions chart to create the entry rate metric:

  • Sessions: Count sessions.
    • A: All sessions.
      • Grouped by the First Property Value of the Page View event property Page Title.
    • B: All sessions.

To filter results by a specific domain or URL of sessions A and B:

  • Click Filter by and choose Contains Event. Search for the Page Viewed event. Set the count to greater than or equal to one.

    • Click Filter to add a where clause for your Page URL.
  • Measured as: Formula %:SESSIONTOTALS(A)/SESSIONTOTALS(B).

  • Segmented by: All users.

This User Sessions chart calculates the 30-day entry rate for the Page URL ampli.com/home. The chart's group-by property value Page Title appears as different colored lines in the chart. The entry rate for March 3rd was 35.5 percent for the Home property value.

Entry rate by page title for ampli.com/home. Home leads at about 30–40% throughout, reaching 35.5% on March 3; the other five page titles sit lower, mostly between 8% and 20%.
30-day entry rate by page for ampli.com/home
DateHomeLog InProteinSupportSign UpProduce
Feb 21, 202633.513.514.210.511.216
Feb 22, 202633.415.416.1141011
Feb 23, 202638.214.115.511.59.512.5
Feb 24, 202639.714.91410414
Feb 25, 20263212.513.214.81213.5
Feb 26, 20263615159.510.512
Feb 27, 202638.613.816.810.2814.5
Feb 28, 202632.314.51289.513
Mar 1, 202636.315.215.59.511.512.5
Mar 2, 202635.414.81610.51011.5
Mar 3, 202635.51516.2109.812
Mar 4, 20263315.416.111.510.513.5
Mar 5, 202634.914.116.510.8914
Mar 6, 202636.214.915.99.58.513.5
Mar 7, 202635.412.517111012
Mar 8, 202636.125.71210.5711.5
Mar 9, 20263112.711.48.59.512.5
Mar 10, 20263516.415.41210.513
Mar 11, 202635.816.512.810.5914.5
Mar 12, 202634.914.913.69.81113.5
Mar 13, 202635.816.415.411.210.212
Mar 14, 20263515.715.7109.512.5
Mar 15, 20263014.720.69.58.812
Mar 16, 202628.316.418.28.81013
Mar 17, 20263315.9151011.514
Mar 18, 202635.514.814.511.59.520.5
Mar 19, 202634.815.51610.21015
Mar 20, 202634.114.215.29.58.513.5
Mar 21, 202636.51514.810.89.812.5
Mar 22, 20263714.515.51010.513

Each line shows the entry rate for one page title, meaning the share of sessions that begin on that page. Home leads throughout at roughly 30 to 40 percent, reaching 35.5 percent on March 3, while the other five page titles sit well below it. Read together, the lines confirm that Home is where most sessions start.

Exit rate

The exit rate metric compares sessions with a Page View event grouped by the last property value of the specified event property to the total number of sessions, as a percentage.

Use the following setup for each module in your User Sessions chart to create the exit rate metric:

  • Sessions: Count sessions.
    • A: All sessions.
      • Grouped by the Last Property Value of the Page View event property Page Title.
    • B: All sessions.

To filter results by a specific domain or URL of sessions A and B:

  • Click Filter by and choose Contains Event. Search for the Page Viewed event. Set the count to greater than or equal to one.

    • Click Filter to add a where clause for your Page URL.
  • Measured as: Formula %:SESSIONTOTALS(A)/SESSIONTOTALS(B).

  • Segmented by: All users.

This User Sessions chart calculates the 30-day exit rate for the Page URL ampli.com/home. The chart's group-by property value Page Title appears as different colored lines in the chart. The exit rate for March 4th was 16.1 percent for the Log In property value.

Exit rate by page title for ampli.com/home. Home leads at about 30–40% throughout; Log In sits around 15–18% and is 16.1% on March 4, with the remaining page titles mostly between 6% and 20%.
30-day exit rate by page for ampli.com/home
DateHomeLog InProteinSupportSign UpProduce
Feb 21, 202634161410.59.512
Feb 22, 20263315.815.511.51110.5
Feb 23, 202638.514.519.89.5811.5
Feb 24, 2026391616104.512
Feb 25, 20263415.213.5131010
Feb 26, 202639.815.9159.511.511.5
Feb 27, 202632.516.514.5119.512.5
Feb 28, 20263614.8138.58.510
Mar 1, 20263815.515.510.51011
Mar 2, 202636.516.216111112
Mar 3, 20263615.814.5109.510.5
Mar 4, 202635.516.11511.510.511.5
Mar 5, 202634.515.516.510.5912
Mar 6, 202636.516.8149.58.510.5
Mar 7, 202638.51513.51110.511
Mar 8, 20263416.21510119.5
Mar 9, 20263313.812.58.56.510.5
Mar 10, 20263615.915.511.59.511
Mar 11, 20263515.916.710.51010.5
Mar 12, 202635.116.913.89.811.511.5
Mar 13, 202635.415.914.6119.510
Mar 14, 202637.715.214.710.51011
Mar 15, 202636.915.9159.58.510.5
Mar 16, 202628.217.119.4129.59.5
Mar 17, 202627.718.220.111.51111
Mar 18, 202634.116.213.710612
Mar 19, 202636.115.313.59.510.510.5
Mar 20, 202634.818.714.91199
Mar 21, 202634.81715.410.51011.5
Mar 22, 202637.613.317.7109.510

Each line shows the exit rate for one page title, meaning the share of sessions that end on that page. Home carries the highest exit share, while Log In sits around 15 to 18 percent and reaches 16.1 percent on March 4. Compare a page's entry rate against its exit rate to see where sessions start versus where they drop off: a page that ranks high in both, like Home, both opens and closes many sessions.

Performance marketing metrics

Amplitude supports several common performance marketing metrics. Create these metrics by following the recipes in this section.

Ad network clicks

  • Metric type: Formula.
  • Event: Daily ad metric.
  • Grouped by: ad_metrics.clicks.
  • Formula: PROPSUM(A).

Ad network impressions

  • Metric type: Formula.
  • Event: Daily ad metric.
  • Grouped by: ad_metrics.impressions.
  • Formula: PROPSUM(A).

Ad network costs

  • Metric type: Formula.
  • Event: Daily ad metric.
  • Grouped by: ad_metrics.costs.
  • Formula: PROPSUM(A).

Return on ad spending

  • Metric type: Formula.
  • Event A: Complete purchase.
    • Grouped by: Revenue.
  • Event B: Daily ad metric.
    • Grouped by: ad_metrics.cost.
  • Formula: %: PROPSUM(A) / PROPSUM(B).

Customer acquisition cost

  • Metric type: Formula.
  • Event A: Daily ad metric.
    • Grouped by: ad_metrics.cost.
  • Event B: User Sign Up.
  • Formula: $: PROPSUM(A) / TOTALS(B).

Clickthrough rate

  • Metric type: Formula.
  • Event A: Daily ad metric.
    • Grouped by: ad_metrics.impressions.
  • Event B: Daily ad metric.
    • Grouped by: ad_metrics.clicks.
  • Formula: %: PROPSUM(A) / PROPSUM(B).

Was this helpful?