Bug 1677497 - Add support for the attribution parameter: dltoken r=nalexander,Mardak

Differential Revision: https://phabricator.services.mozilla.com/D100969
This commit is contained in:
Kirk Steuber 2021-01-20 01:08:43 +00:00
parent 540744a1ef
commit 6bf6521c69
4 changed files with 22 additions and 0 deletions

View File

@ -50,6 +50,7 @@ const ATTR_CODE_KEYS = [
"experiment",
"variation",
"ua",
"dltoken",
];
let gCachedAttrData = null;

View File

@ -48,6 +48,10 @@ let validAttrCodes = [
code: "ua%3DGoogle%20Chrome%20123",
parsed: { ua: "Google%20Chrome%20123" },
},
{
code: "dltoken%3Dc18f86a3-f228-4d98-91bb-f90135c0aa9c",
parsed: { dltoken: "c18f86a3-f228-4d98-91bb-f90135c0aa9c" },
},
];
let invalidAttrCodes = [

View File

@ -527,6 +527,7 @@ export class ASRouterAdminInner extends React.PureComponent {
experiment: "ua-onboarding",
variation: "chrome",
ua: "Google Chrome 123",
dltoken: "00000000-0000-0000-0000-000000000000",
},
};
}
@ -1565,6 +1566,21 @@ export class ASRouterAdminInner extends React.PureComponent {
/>{" "}
</td>
</tr>
<tr>
<td>
<b> Download Token </b>
</td>
<td>
{" "}
<input
type="text"
name="dltoken"
placeholder="00000000-0000-0000-0000-000000000000"
value={this.state.attributionParameters.dltoken}
onChange={this.onChangeAttributionParameters}
/>{" "}
</td>
</tr>
<tr>
<td>
{" "}

View File

@ -83,6 +83,7 @@ Structure:
variation: <string>, // name/id of the variation cohort used in the enrolled funnel experiment
experiment: <string>, // name/id of the enrolled funnel experiment
ua: <string>, // identifier derived from the user agent downloading the installer, e.g., chrome, Google Chrome 123
dltoken: <string>, // Unique token created at Firefox download time. ex: c18f86a3-f228-4d98-91bb-f90135c0aa9c
},
sandbox: {
effectiveContentProcessLevel: <integer>,