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

Commit 4dfbaa5

Browse files
authored
Merge pull request #5398 from negarn/negar/add_gtm_to_grid
negar/add_gtm_to_grid
2 parents 6c58bc6 + 2e88a02 commit 4dfbaa5

File tree

8 files changed

+21
-11
lines changed

8 files changed

+21
-11
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/_common/layout.jsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import React from 'react';
1+
import React from 'react';
22
import OutdatedBrowserMessage from './outdated_browser_message.jsx';
3-
import Title from '../../_common/components/title.jsx';
4-
import AntiClickjack from '../../_common/includes/anti_clickjack.jsx';
5-
import Favicons from '../../_common/includes/favicons.jsx';
6-
import GoogleOptimizer from '../../_common/includes/google_optimizer.jsx';
3+
import Title from '../../_common/components/title.jsx';
4+
import AntiClickjack from '../../_common/includes/anti_clickjack.jsx';
5+
import Favicons from '../../_common/includes/favicons.jsx';
6+
import GoogleOptimizer from '../../_common/includes/google_optimizer.jsx';
7+
import Gtm from '../../_common/includes/gtm.jsx';
78

89
const Layout = ({
910
meta_description,
@@ -38,6 +39,8 @@ const Layout = ({
3839
</head>
3940

4041
<body>
42+
<Gtm />
43+
4144
{children}
4245

4346
<OutdatedBrowserMessage />

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable react/jsx-no-target-blank */
2-
import React from 'react';
2+
import React from 'react';
33
import Layout from './_common/layout.jsx';
44

55
const gridLP = () => (
@@ -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)