From 47c016e3c419a1f8e99d017d3f8ac3851be76e66 Mon Sep 17 00:00:00 2001 From: Phil Booth Date: Thu, 16 Aug 2018 10:21:52 +0100 Subject: [PATCH 1/3] feat(docs): add machine-readable validation regexes for fxa metrics --- docs/accounts/metrics.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/accounts/metrics.md b/docs/accounts/metrics.md index d7ca6b9038..6852a6948b 100644 --- a/docs/accounts/metrics.md +++ b/docs/accounts/metrics.md @@ -29,16 +29,16 @@ By following these instructions you provide both of our teams with data needed t **If you are a developer, please read the following before checking the chart below.** The values that are passed in the parameters below are subject to validation via regular expressions. **If the parameter values do not conform to their associated regexes in [this file](https://github.com/mozilla/fxa-content-server/blob/0921bc53e92f3b8e4e796f51cc46202d1cfae25e/server/lib/flow-event.js) then all metrics events associated with the nonconforming parameters will fail to be logged!** -|Name|Description|Example Values|Amplitude Chart Example| -|----|-----------|-------------|-----------------| -|`entrypoint`|The specific page or browser UI element containing the first step of the FxA sign-in/sign-up process (e.g., enter email form)|`firstrun`|[Firstrun form views](https://analytics.amplitude.com/mozilla-corp/chart/n8cd9no)| -|`service`|The name of the FxA relier/service that the user is signing into|`sync`|[Completed Registrations by Service](https://analytics.amplitude.com/mozilla-corp/chart/85v4c88)| -|`form_type`|For self-hosted forms only (see above) the type of form that the user submits to begin the FxA flow|either: `email` if the form captures the user's email, otherwise `other`|NA| -|`utm_source`|Unambiguous identifier of site or browser UI element that linked to the page containing the beginning of the FxA sign-in/sign-up process |`blog.mozilla.org`|[Registration form views segmented by utm_source](https://analytics.amplitude.com/mozilla-corp/chart/f5sz7kt)| -|`utm_campaign`|More general label for the campaign that the site is part of|`firstrun`|TBD| -|`utm_content`|Used to track the name of an A-B test|`my-experiment`|TBD| -|`utm_term`|Used to track the cohort or variation in an A-B test|`my-experiment-var-a`|TBD| -|`utm_medium`|What type of link was used to direct to the page, if it came through a marketing campaign|`email`, `cpc`|TBD| +|Name|Description|Example Values|Validation regex|Amplitude Chart Example| +|----|-----------|--------------|----------------|-----------------------| +|`entrypoint`|The specific page or browser UI element containing the first step of the FxA sign-in/sign-up process (e.g., enter email form)|`firstrun`|^[\w.:-]+$|[Firstrun form views](https://analytics.amplitude.com/mozilla-corp/chart/n8cd9no)| +|`service`|The name of the FxA relier/service that the user is signing into|`sync`|^(sync|content-server|none|[0-9a-f]{16})$|[Completed Registrations by Service](https://analytics.amplitude.com/mozilla-corp/chart/85v4c88)| +|`form_type`|For self-hosted forms only (see above) the type of form that the user submits to begin the FxA flow|either: `email` if the form captures the user's email, otherwise `other`||NA| +|`utm_source`|Unambiguous identifier of site or browser UI element that linked to the page containing the beginning of the FxA sign-in/sign-up process |`blog.mozilla.org`|^[\w\/.%-]+$|[Registration form views segmented by utm_source](https://analytics.amplitude.com/mozilla-corp/chart/f5sz7kt)| +|`utm_campaign`|More general label for the campaign that the site is part of|`firstrun`|^[\w\/.%-]+$|TBD| +|`utm_content`|Used to track the name of an A-B test|`my-experiment`|^[\w\/.%-]+$|TBD| +|`utm_term`|Used to track the cohort or variation in an A-B test|`my-experiment-var-a`|^[\w\/.%-]+$|TBD| +|`utm_medium`|What type of link was used to direct to the page, if it came through a marketing campaign|`email`, `cpc`|^[\w\/.%-]+$|TBD| **Note these may not be all the parameters you need to pass for your integration to work!** A more exhaustive but [less detailed list can be found here.](https://github.com/mozilla/fxa-content-server/blob/549fc459b851088ea910da182e17e748fa157f26/docs/query-params.md#context) What is documented above are only the parameters that are relevant for metrics analysis in (e.g.) amplitude. From 13a03ee3ab6ca432ed3f36b242cd223cce0712a9 Mon Sep 17 00:00:00 2001 From: Phil Booth Date: Thu, 16 Aug 2018 10:58:53 +0100 Subject: [PATCH 2/3] fix(docs): remove the service param from metrics docs --- docs/accounts/metrics.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/accounts/metrics.md b/docs/accounts/metrics.md index 6852a6948b..a936bda1f3 100644 --- a/docs/accounts/metrics.md +++ b/docs/accounts/metrics.md @@ -32,7 +32,6 @@ By following these instructions you provide both of our teams with data needed t |Name|Description|Example Values|Validation regex|Amplitude Chart Example| |----|-----------|--------------|----------------|-----------------------| |`entrypoint`|The specific page or browser UI element containing the first step of the FxA sign-in/sign-up process (e.g., enter email form)|`firstrun`|^[\w.:-]+$|[Firstrun form views](https://analytics.amplitude.com/mozilla-corp/chart/n8cd9no)| -|`service`|The name of the FxA relier/service that the user is signing into|`sync`|^(sync|content-server|none|[0-9a-f]{16})$|[Completed Registrations by Service](https://analytics.amplitude.com/mozilla-corp/chart/85v4c88)| |`form_type`|For self-hosted forms only (see above) the type of form that the user submits to begin the FxA flow|either: `email` if the form captures the user's email, otherwise `other`||NA| |`utm_source`|Unambiguous identifier of site or browser UI element that linked to the page containing the beginning of the FxA sign-in/sign-up process |`blog.mozilla.org`|^[\w\/.%-]+$|[Registration form views segmented by utm_source](https://analytics.amplitude.com/mozilla-corp/chart/f5sz7kt)| |`utm_campaign`|More general label for the campaign that the site is part of|`firstrun`|^[\w\/.%-]+$|TBD| From 118cb7e573c805ea2a67d036bb6c849217349c67 Mon Sep 17 00:00:00 2001 From: Vlad Filippov Date: Mon, 20 Aug 2018 13:59:31 -0400 Subject: [PATCH 3/3] Update doc date --- docs/accounts/metrics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/accounts/metrics.md b/docs/accounts/metrics.md index a936bda1f3..291a3f5079 100644 --- a/docs/accounts/metrics.md +++ b/docs/accounts/metrics.md @@ -1,5 +1,5 @@ # Firefox Accounts Metrics -*Last updated 2018-08-03*
+*Last updated 2018-08-20*
*Compiled by Leif Oines loines at mozilla dot com* **This file is WIP**. In the future it will be a combined resource detailing data collection, metrics definitions, pipeline information, etc. For now it mainly documents metrics parameters (e.g. utm_*) that reliers pass to Firefox Accounts servers.