Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit bef601f

Browse files
committed
add datalayer push script to all landing pages
1 parent ffc6f25 commit bef601f

File tree

7 files changed

+12
-5
lines changed

7 files changed

+12
-5
lines changed

scripts/config/pages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,6 @@ module.exports = [
128128
['graduates', 'landing_pages/graduate_program', null, 'Binary.com Graduate Program', 'NOT-en'],
129129
// ['hackathon', 'landing_pages/hackathon', null, 'Hackathon Competition', 'NOT-en'],
130130
['introducing-usb', 'landing_pages/usb', null, 'Introducing USB', 'NOT-en'],
131-
['binarygrid', 'landing_pages/grid_landing', null, 'Our New Mobile Trading App', 'NOT-en'],
131+
['binarygrid', 'landing_pages/binary_grid', null, 'Our New Mobile Trading App', 'NOT-en'],
132132
['landing/signup-frame', 'landing_pages/signup_frame', null, 'Sign up'],
133133
];
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
window.onload = function () {
2+
commonOnload();
3+
};

src/javascript/landing_pages/common.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ function setupCrowdin() {
173173

174174
function commonOnload() {
175175
setupCrowdin();
176+
dataLayer.push({ event: 'page_load' });
176177
}
177178

178179
// displays notification on outdated browsers

src/javascript/landing_pages/signup_frame.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
const error_class = 'error-field';
22

33
window.onload = function () {
4-
dataLayer.push({ event: 'page_load' });
5-
64
const el_email = document.getElementById('email');
75
const el_signup = document.getElementById('signup');
86
const el_success = document.getElementById('success');
@@ -58,6 +56,8 @@ window.onload = function () {
5856
if (gclid) {
5957
localStorage.setItem('gclid', gclid);
6058
}
59+
60+
commonOnload();
6161
};
6262

6363
function validateEmail(email) {

src/javascript/landing_pages/usb_page.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ function collapseNavbar() {
99

1010
$(window).scroll(collapseNavbar);
1111
$(document).ready(collapseNavbar);
12+
13+
window.onload = function () {
14+
commonOnload();
15+
};

src/templates/landing_pages/grid_landing.jsx renamed to src/templates/landing_pages/binary_grid.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const gridLP = () => (
1313
'https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js',
1414
'https://style.binary.com/binary.more.js',
1515
it.url_for('js/landing_pages/common.js'),
16+
it.url_for('js/landing_pages/binary_grid.js'),
1617
]}
1718
>
1819

src/templates/landing_pages/signup_frame.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react';
2-
import GTM from '../_common/includes/gtm.jsx';
32
import FormVerifyEmail from '../_common/includes/form_verify_email.jsx';
43

54
const style = () =>
@@ -36,7 +35,6 @@ const SignUpFrame = () => (
3635
<html>
3736
<Head />
3837
<body>
39-
<GTM />
4038
<div className='home-content'>
4139
<FormVerifyEmail text='Create free account' className='secondary-bg-color' dark_button='1'>
4240
<FormVerifyEmailChildren />

0 commit comments

Comments
 (0)