Skip to content

Commit

Permalink
Updated additional locations
Browse files Browse the repository at this point in the history
  • Loading branch information
maxxcrawford committed Apr 1, 2020
1 parent 9820d04 commit b09b9bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions public/js/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,14 +451,14 @@ function addBentoObserver(){
const createFxaCheckbox = document.getElementById("createFxaCheckbox");

createFxaCheckbox.addEventListener("change", (e)=> {
document.body.dataset.utm_content = "opt_out";
document.body.dataset.utm_content = "opt-out";
if (event.target.checked) {
document.body.dataset.utm_content = "opt_in";
document.body.dataset.utm_content = "opt-in";
}
});

submitBtn.addEventListener("click", (e)=> {
document.body.dataset.utm_content = "opt_out";
document.body.dataset.utm_content = "opt-out";
if (createFxaCheckbox.checked) {
e.preventDefault();

Expand All @@ -472,13 +472,13 @@ function addBentoObserver(){
}

// Analytics
document.body.dataset.utm_content = "opt_in";
document.body.dataset.utm_content = "opt-in";
e.target.dataset.entrypoint = "fx-monitor-alert-me-blue-link";
if (typeof(ga) !== "undefined") {
ga("send", {
hitType: "event",
eventCategory: "growthuserflow1",
eventAction: "opt_in",
eventAction: "opt-in",
eventLabel: "fx-monitor-alert-me-blue-link",
});
}
Expand All @@ -488,7 +488,7 @@ function addBentoObserver(){
ga("send", {
hitType: "event",
eventCategory: "growthuserflow1",
eventAction: "opt_out",
eventAction: "opt-out",
eventLabel: "fx-monitor-alert-me-blue-link",
});
}
Expand Down
2 changes: 1 addition & 1 deletion views/layouts/default.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<link rel="icon" href="/img/favicons/favicon-128.png" sizes="128x128" />
<link rel="icon" href="/img/favicons/favicon-256.png" sizes="256x256" />
</head>
<body {{> analytics/default_dataset }} {{#if experimentBranch }} {{> analytics/experiment }} data-utm_term="{{experimentBranch}}" data-experiment="{{experimentBranch}}" form_type="email" data-utm_content="{{#if experimentBranchB }}opt_out{{else}}opt_in{{/if}}" {{/if}} data-bento-app-id="fx-monitor">
<body {{> analytics/default_dataset }} {{#if experimentBranch }} {{> analytics/experiment }} data-utm_term="{{experimentBranch}}" data-experiment="{{experimentBranch}}" form_type="email" data-utm_content="{{#if experimentBranchB }}opt-out{{else}}opt-in{{/if}}" {{/if}} data-bento-app-id="fx-monitor">
{{> header/header }}
{{{ body }}}
{{> footer }}
Expand Down

0 comments on commit b09b9bf

Please sign in to comment.