-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'latest' into localise-other-languages-footer-link
- Loading branch information
Showing
11 changed files
with
52 additions
and
860 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# AMP Experiment | ||
|
||
This directory contains code for a generic wrapper component that contains an `<amp-experiment/>` and an `<amp-analytics/>`. This component should be used when running experiments on AMP pages. | ||
|
||
|
||
## Usage | ||
This component can be placed anywhere on a page that the experiment runs on and does not render any visual components. | ||
|
||
It accepts `experimentConfig` and `analyticsConfig` as props. These are objects that should be formatted as such: | ||
|
||
**`experimentConfig`** | ||
``` | ||
{ | ||
"experimentName": { | ||
"variants": { | ||
"control": 12.5, | ||
"variant_1": 12.5, | ||
"variant_2": 25.0 | ||
} | ||
} | ||
} | ||
``` | ||
|
||
**`analyticsConfig`** | ||
``` | ||
{ | ||
"requests": { // Endpoints to send requests to | ||
"request-name": request-value, | ||
... | ||
}, | ||
"triggers": { // Triggers for when to send events | ||
"trigger-name": trigger-object, | ||
} | ||
} | ||
``` | ||
|
||
## Analytics configuration | ||
This component is designed to have a separate `<amp-analytics/>` component from existing ones on a page for better isolation of code/events specific to a given experiment. | ||
|
||
**Note: This component will not add AMP experiment name/variant information to pageview events. This should be done separately by passing `ampExperimentName` to the `atiData` used.** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.