Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Commit

Permalink
Remove phone-test
Browse files Browse the repository at this point in the history
  • Loading branch information
kenmickles committed May 9, 2018
1 parent 13e26d2 commit 15f41a3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/app.scss
Expand Up @@ -465,4 +465,3 @@ body[data-variant="full-form"][data-phone-test="without-phone"] {
@include data-filter(loading, true, false);
@include data-filter(minimized, true, false);
@include data-filter(donations, true, false);
@include data-filter(phone-test, with-phone, without-phone);
7 changes: 3 additions & 4 deletions src/index.html
Expand Up @@ -6,7 +6,7 @@
<title>{{ title }}</title>
<link rel="stylesheet" href="https://use.typekit.net/dkr1hdf.css">
</head>
<body data-org="fftf" data-variant="full-form" data-step="1" data-minimized="true" data-phone-test="with-phone" data-donations="true">
<body data-org="fftf" data-variant="full-form" data-step="1" data-minimized="true" data-donations="true">
<div class="flex-center" data-minimized="false">
<div class="container">
<div class="step" id="step1" data-step="1">
Expand All @@ -22,12 +22,11 @@ <h1>{{ title }}</h1>
<div class="row">
<input type="address" name="member[street_address]" placeholder="{{ step1.address_placeholder }}" class="address" required>
<input type="tel" name="member[postcode]" placeholder="{{ step1.zip_placeholder }}" class="zip" required id="email_zip">
<input type="tel" name="member[phone_number]" placeholder="{{ step1.phone_placeholder }}" class="phone" id="step1_phone" data-phone-test="with-phone">
<input type="tel" name="member[phone_number]" placeholder="{{ step1.phone_placeholder }}" class="phone" id="step1_phone">
</div>
<a class="btn" data-loading="true">{{ step1.loading_button }}</a>
<button class="btn" data-loading="false">{{ step1.cta_button }}</button>
<div class="disclaimer" data-phone-test="with-phone">{{{ step1.disclaimer_with_phone_html }}}</div>
<div class="disclaimer" data-phone-test="without-phone">{{{ step1.disclaimer_without_phone_html }}}</div>
<div class="disclaimer">{{{ step1.disclaimer_with_phone_html }}}</div>

<!-- Mothership Honeypot Bot Defense -->
<input class="hidden" type="checkbox" checked="checked" name="hp_enabled">
Expand Down
6 changes: 1 addition & 5 deletions src/index.js
Expand Up @@ -57,7 +57,7 @@ function addTrackingEvents() {
attachEvent('.btn-facebook', 'click', () => trackEvent('facebook_button', 'click'))
attachEvent('.btn-twitter', 'click', () => trackEvent('twitter_button', 'click'))
attachEvent('.btn-donate', 'click', () => trackEvent('donate_button', 'click'))
attachEvent('.email-form', 'submit', () => trackEvent('email_form', 'submit', 'phone-test=' + document.body.getAttribute('data-phone-test')))
attachEvent('.email-form', 'submit', () => trackEvent('email_form', 'submit'))
attachEvent('.call-form', 'submit', () => trackEvent('call_form', 'submit'))
attachEvent('.minimized .close', 'click', () => trackEvent('minimized_close_button', 'click'))
attachEvent('.minimized .btn', 'click', event => {
Expand Down Expand Up @@ -277,10 +277,6 @@ function init() {
const position = query.position === 'left' ? 'left' : 'right'
document.body.setAttribute('data-position', position)

if (Math.random() < 0.5) {
document.body.setAttribute('data-phone-test', 'without-phone')
}

if (isTruthy(query.qa) && !navigator.doNotTrack) {
initGoogleAnalytics(`redalert-widget-${variant}`)
addTrackingEvents()
Expand Down

0 comments on commit 15f41a3

Please sign in to comment.