Skip to content

Commit

Permalink
Removed opt-in/out values from previous experiment, set custom dimens…
Browse files Browse the repository at this point in the history
…ion when in active expierment
  • Loading branch information
maxxcrawford committed Apr 22, 2020
1 parent 1928773 commit d7f46d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions public/js/fxa-analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ function sendRecommendationPings(ctaSelector) {
ga("set", "anonymizeIp", true);
ga("set", "transport", "beacon");
ga("set", "dimension6", `${document.body.dataset.signedInUser}`);
if (document.body.dataset.experiment) {
// If an experiment is active, set the "Growth Experiment Version"
// Custom Dimension to whichever branch is active.
ga("set", "dimension7", `${document.body.dataset.experiment}`);
}

ga("send", "pageview", {
hitCallback: function() {
Expand Down
1 change: 0 additions & 1 deletion views/partials/analytics/experiment.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
data-utm_term={{experimentBranch}}
data-experiment={{experimentBranch}}
data-utm_content="{{#if experimentBranchB }}opt-out{{else}}opt-in{{/if}}"
data-utm_campaign="growthuserflow2"

0 comments on commit d7f46d9

Please sign in to comment.