From ae3a774e112a183fa78c651ca06b28fc5a09fa4a Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 6 Dec 2024 18:03:16 +0000 Subject: [PATCH 1/6] add fields --- website/docs/docs/build/conversion-metrics.md | 5 ++++- website/docs/docs/build/simple.md | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/website/docs/docs/build/conversion-metrics.md b/website/docs/docs/build/conversion-metrics.md index 97809a13a76..2d227f4a703 100644 --- a/website/docs/docs/build/conversion-metrics.md +++ b/website/docs/docs/build/conversion-metrics.md @@ -34,6 +34,7 @@ Note that we use the double colon (::) to indicate whether a parameter is nested | `base_measure:name` | The base conversion event measure. | Required | String | | `base_measure:fill_nulls_with` | Set the value in your metric definition instead of null (such as zero). | Optional | String | | `base_measure:join_to_timespine` | Boolean that indicates if the aggregated measure should be joined to the time spine table to fill in missing dates. Default `false`. | Optional | Boolean | +| `base_measure:filter` | Optional `filter` used to apply to the base measure. | Optional | String | | `conversion_measure` | A list of conversion measure inputs. | Required | Dict | | `conversion_measure:name` | The base conversion event measure.| Required | String | | `conversion_measure:fill_nulls_with` | Set the value in your metric definition instead of null (such as zero). | Optional | String | @@ -61,6 +62,7 @@ metrics: name: The name of the measure # Required fill_nulls_with: Set the value in your metric definition instead of null (such as zero) # Optional join_to_timespine: true/false # Boolean that indicates if the aggregated measure should be joined to the time spine table to fill in missing dates. Default `false`. # Optional + filter: The filter used to apply to the base measure. # Optional conversion_measure: name: The name of the measure # Required fill_nulls_with: Set the value in your metric definition instead of null (such as zero) # Optional @@ -105,12 +107,13 @@ Next, define a conversion metric as follows: - name: visit_to_buy_conversion_rate_7d description: "Conversion rate from visiting to transaction in 7 days" type: conversion - label: Visit to Buy Conversion Rate (7-day window) + label: Visit to buy conversion rate (7-day window) type_params: conversion_type_params: base_measure: name: visits fill_nulls_with: 0 + filter: {{ Dimension('visits__referrer_id') }} = 'facebook' conversion_measure: name: sellers entity: user diff --git a/website/docs/docs/build/simple.md b/website/docs/docs/build/simple.md index 872a4d34fa8..d84ab7735fc 100644 --- a/website/docs/docs/build/simple.md +++ b/website/docs/docs/build/simple.md @@ -24,6 +24,8 @@ Note that we use the double colon (::) to indicate whether a parameter is nested | `type_params` | The type parameters of the metric. | Required | Dict | | `measure` | A list of measure inputs. | Required | List | | `measure:name` | The measure you're referencing. | Required | String | +| `measure:alias` | Optional [`alias`](/reference/resource-configs/alias) used to rename the measure. | Optional | String | +| `measure:filter` | Optional `filter` used to apply to the measure. | Optional | String | | `measure:fill_nulls_with` | Set the value in your metric definition instead of null (such as zero). | Optional | String | | `measure:join_to_timespine` | Indicates if the aggregated measure should be joined to the time spine table to fill in missing dates. Default `false`. | Optional | Boolean | @@ -38,6 +40,8 @@ metrics: type_params: # Required measure: name: The name of your measure # Required + alias: The alias used to rename the measure. # Optional + filter: The filter used to apply to the measure. # Optional fill_nulls_with: Set value instead of null (such as zero) # Optional join_to_timespine: true/false # Boolean that indicates if the aggregated measure should be joined to the time spine table to fill in missing dates. # Optional @@ -65,9 +69,11 @@ If you've already defined the measure using the `create_metric: true` parameter, name: customers # The measure you are creating a proxy of. fill_nulls_with: 0 join_to_timespine: true + alias: customer_count + filter: {{ Dimension('customer__customer_total') }} >+ 20 - name: large_orders description: "Order with order values over 20." - type: SIMPLE + type: simple label: Large orders type_params: measure: From 4520091f9460d36b1144f39b9f6ed120f856bd33 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:08:16 +0000 Subject: [PATCH 2/6] Update website/docs/docs/build/simple.md --- website/docs/docs/build/simple.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/simple.md b/website/docs/docs/build/simple.md index d84ab7735fc..b2a65d2668e 100644 --- a/website/docs/docs/build/simple.md +++ b/website/docs/docs/build/simple.md @@ -70,7 +70,7 @@ If you've already defined the measure using the `create_metric: true` parameter, fill_nulls_with: 0 join_to_timespine: true alias: customer_count - filter: {{ Dimension('customer__customer_total') }} >+ 20 + filter: {{ Dimension('customer__customer_total') }} >= 20 - name: large_orders description: "Order with order values over 20." type: simple From 5a9202355d5c31e07445174b17942a53136d9bef Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:48:35 +0000 Subject: [PATCH 3/6] Update simple.md Co-authored-by: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> --- website/docs/docs/build/simple.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/simple.md b/website/docs/docs/build/simple.md index b2a65d2668e..31475e5b01e 100644 --- a/website/docs/docs/build/simple.md +++ b/website/docs/docs/build/simple.md @@ -40,7 +40,7 @@ metrics: type_params: # Required measure: name: The name of your measure # Required - alias: The alias used to rename the measure. # Optional + alias: The alias applied to the measure. # Optional filter: The filter used to apply to the measure. # Optional fill_nulls_with: Set value instead of null (such as zero) # Optional join_to_timespine: true/false # Boolean that indicates if the aggregated measure should be joined to the time spine table to fill in missing dates. # Optional From 0243800ae5bf3a615b5c835cc12d462eeb99821f Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:48:47 +0000 Subject: [PATCH 4/6] Update simple.md Co-authored-by: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> --- website/docs/docs/build/simple.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/simple.md b/website/docs/docs/build/simple.md index 31475e5b01e..5e485353282 100644 --- a/website/docs/docs/build/simple.md +++ b/website/docs/docs/build/simple.md @@ -41,7 +41,7 @@ metrics: measure: name: The name of your measure # Required alias: The alias applied to the measure. # Optional - filter: The filter used to apply to the measure. # Optional + filter: The filter applied to the measure. # Optional fill_nulls_with: Set value instead of null (such as zero) # Optional join_to_timespine: true/false # Boolean that indicates if the aggregated measure should be joined to the time spine table to fill in missing dates. # Optional From 46a907a0b4503210bd9b46e1fd1b067c238f643a Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 9 Dec 2024 09:55:48 +0000 Subject: [PATCH 5/6] Update website/docs/docs/build/simple.md Co-authored-by: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> --- website/docs/docs/build/simple.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/simple.md b/website/docs/docs/build/simple.md index 5e485353282..9b20a952ae6 100644 --- a/website/docs/docs/build/simple.md +++ b/website/docs/docs/build/simple.md @@ -24,7 +24,7 @@ Note that we use the double colon (::) to indicate whether a parameter is nested | `type_params` | The type parameters of the metric. | Required | Dict | | `measure` | A list of measure inputs. | Required | List | | `measure:name` | The measure you're referencing. | Required | String | -| `measure:alias` | Optional [`alias`](/reference/resource-configs/alias) used to rename the measure. | Optional | String | +| `measure:alias` | Optional [`alias`](/reference/resource-configs/alias) to rename the measure. | Optional | String | | `measure:filter` | Optional `filter` used to apply to the measure. | Optional | String | | `measure:fill_nulls_with` | Set the value in your metric definition instead of null (such as zero). | Optional | String | | `measure:join_to_timespine` | Indicates if the aggregated measure should be joined to the time spine table to fill in missing dates. Default `false`. | Optional | Boolean | From 8f6cd6a265a94d4419cb707afc344e1ca5a00cde Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 9 Dec 2024 09:55:55 +0000 Subject: [PATCH 6/6] Update website/docs/docs/build/simple.md Co-authored-by: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> --- website/docs/docs/build/simple.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/simple.md b/website/docs/docs/build/simple.md index 9b20a952ae6..2deb718d780 100644 --- a/website/docs/docs/build/simple.md +++ b/website/docs/docs/build/simple.md @@ -25,7 +25,7 @@ Note that we use the double colon (::) to indicate whether a parameter is nested | `measure` | A list of measure inputs. | Required | List | | `measure:name` | The measure you're referencing. | Required | String | | `measure:alias` | Optional [`alias`](/reference/resource-configs/alias) to rename the measure. | Optional | String | -| `measure:filter` | Optional `filter` used to apply to the measure. | Optional | String | +| `measure:filter` | Optional `filter` applied to the measure. | Optional | String | | `measure:fill_nulls_with` | Set the value in your metric definition instead of null (such as zero). | Optional | String | | `measure:join_to_timespine` | Indicates if the aggregated measure should be joined to the time spine table to fill in missing dates. Default `false`. | Optional | Boolean |