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

negar/add_gtm_to_grid #5398

Merged
merged 4 commits into from
Apr 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/config/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,6 @@ module.exports = [
['graduates', 'landing_pages/graduate_program', null, 'Binary.com Graduate Program', 'NOT-en'],
// ['hackathon', 'landing_pages/hackathon', null, 'Hackathon Competition', 'NOT-en'],
['introducing-usb', 'landing_pages/usb', null, 'Introducing USB', 'NOT-en'],
['binarygrid', 'landing_pages/grid_landing', null, 'Our New Mobile Trading App', 'NOT-en'],
['binarygrid', 'landing_pages/binary_grid', null, 'Our New Mobile Trading App', 'NOT-en'],
['landing/signup-frame', 'landing_pages/signup_frame', null, 'Sign up'],
];
3 changes: 3 additions & 0 deletions src/javascript/landing_pages/binary_grid.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
window.onload = function () {
commonOnload();
};
1 change: 1 addition & 0 deletions src/javascript/landing_pages/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ function setupCrowdin() {

function commonOnload() {
setupCrowdin();
dataLayer.push({ event: 'page_load' });
}

// displays notification on outdated browsers
Expand Down
4 changes: 2 additions & 2 deletions src/javascript/landing_pages/signup_frame.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const error_class = 'error-field';

window.onload = function () {
dataLayer.push({ event: 'page_load' });

const el_email = document.getElementById('email');
const el_signup = document.getElementById('signup');
const el_success = document.getElementById('success');
Expand Down Expand Up @@ -58,6 +56,8 @@ window.onload = function () {
if (gclid) {
localStorage.setItem('gclid', gclid);
}

commonOnload();
};

function validateEmail(email) {
Expand Down
4 changes: 4 additions & 0 deletions src/javascript/landing_pages/usb_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ function collapseNavbar() {

$(window).scroll(collapseNavbar);
$(document).ready(collapseNavbar);

window.onload = function () {
commonOnload();
};
13 changes: 8 additions & 5 deletions src/templates/landing_pages/_common/layout.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React from 'react';
import React from 'react';
import OutdatedBrowserMessage from './outdated_browser_message.jsx';
import Title from '../../_common/components/title.jsx';
import AntiClickjack from '../../_common/includes/anti_clickjack.jsx';
import Favicons from '../../_common/includes/favicons.jsx';
import GoogleOptimizer from '../../_common/includes/google_optimizer.jsx';
import Title from '../../_common/components/title.jsx';
import AntiClickjack from '../../_common/includes/anti_clickjack.jsx';
import Favicons from '../../_common/includes/favicons.jsx';
import GoogleOptimizer from '../../_common/includes/google_optimizer.jsx';
import Gtm from '../../_common/includes/gtm.jsx';

const Layout = ({
meta_description,
Expand Down Expand Up @@ -38,6 +39,8 @@ const Layout = ({
</head>

<body>
<Gtm />

{children}

<OutdatedBrowserMessage />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable react/jsx-no-target-blank */
import React from 'react';
import React from 'react';
import Layout from './_common/layout.jsx';

const gridLP = () => (
Expand All @@ -13,6 +13,7 @@ const gridLP = () => (
'https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js',
'https://style.binary.com/binary.more.js',
it.url_for('js/landing_pages/common.js'),
it.url_for('js/landing_pages/binary_grid.js'),
]}
>

Expand Down
2 changes: 0 additions & 2 deletions src/templates/landing_pages/signup_frame.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import GTM from '../_common/includes/gtm.jsx';
import FormVerifyEmail from '../_common/includes/form_verify_email.jsx';

const style = () =>
Expand Down Expand Up @@ -36,7 +35,6 @@ const SignUpFrame = () => (
<html>
<Head />
<body>
<GTM />
<div className='home-content'>
<FormVerifyEmail text='Create free account' className='secondary-bg-color' dark_button='1'>
<FormVerifyEmailChildren />
Expand Down