From 651aa9186a4e77869f4a57104f4831b0411d2651 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Tue, 26 Mar 2024 00:01:36 -0500 Subject: [PATCH 1/2] more --- public/index.html | 2 +- src/Components/Home/HomePage.js | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/public/index.html b/public/index.html index b11f3da..260d79a 100644 --- a/public/index.html +++ b/public/index.html @@ -32,8 +32,8 @@ function gtag() { dataLayer.push(arguments); } - gtag("js", new Date()); + gtag("js", new Date()); gtag("config", "G-J6SQL5DF6V"); diff --git a/src/Components/Home/HomePage.js b/src/Components/Home/HomePage.js index 856176c..ec11c3b 100644 --- a/src/Components/Home/HomePage.js +++ b/src/Components/Home/HomePage.js @@ -22,6 +22,26 @@ const HomePage = () => { ? process.env.REACT_APP_API_DEV : process.env.REACT_APP_API_PROD; + useEffect(() => { + window.gtag("event", "screen_view", { + app_name: "novodraft", + screen_name: "Home", + }); + }, []); + + function clickedTryItButton() { + window.gtag("event", "try_it_click", { + app_name: "novodraft", + screen_name: "Home", + }); + } + + function promoSignup() { + window.gtag("event", "promo_sign_up", { + send_to: "G-J6SQL5DF6V", + }); + } + async function saveUserData( authId, dataValues, @@ -111,6 +131,7 @@ const HomePage = () => { try { const usersRef = collection(db, "users"); const res = await setDoc(doc(usersRef, fbAuthUid), userData); + promoSignup(); return res; } catch (error) { console.log(`Error saving new user to db: ${error}`); @@ -195,7 +216,9 @@ const HomePage = () => { } } - const handleTryItButton = () => { + const handleTryItButton = (e) => { + console.log("hndleTryItButton e", e); + clickedTryItButton(); setShowPromoModal(true); }; From a2148360d365dc95487cc084d927b6168deb4e48 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Tue, 26 Mar 2024 00:26:55 -0500 Subject: [PATCH 2/2] more --- public/index.html | 1 - src/Components/Home/HomePage.js | 46 +++++++++++++++++++++++---------- src/styles/homepage.scss | 7 +++++ 3 files changed, 39 insertions(+), 15 deletions(-) diff --git a/public/index.html b/public/index.html index 260d79a..acbee2d 100644 --- a/public/index.html +++ b/public/index.html @@ -32,7 +32,6 @@ function gtag() { dataLayer.push(arguments); } - gtag("js", new Date()); gtag("config", "G-J6SQL5DF6V"); diff --git a/src/Components/Home/HomePage.js b/src/Components/Home/HomePage.js index ec11c3b..1beca02 100644 --- a/src/Components/Home/HomePage.js +++ b/src/Components/Home/HomePage.js @@ -23,23 +23,38 @@ const HomePage = () => { : process.env.REACT_APP_API_PROD; useEffect(() => { - window.gtag("event", "screen_view", { - app_name: "novodraft", - screen_name: "Home", - }); + if (typeof window.gtag !== "undefined") { + window.gtag("event", "screen_view", { + app_name: "novodraft", + screen_name: "Home", + }); + } }, []); function clickedTryItButton() { - window.gtag("event", "try_it_click", { - app_name: "novodraft", - screen_name: "Home", - }); + if (typeof window.gtag !== "undefined") { + window.gtag("event", "try_it_click", { + app_name: "novodraft", + screen_name: "Home", + }); + } } function promoSignup() { - window.gtag("event", "promo_sign_up", { - send_to: "G-J6SQL5DF6V", - }); + if (typeof window.gtag !== "undefined") { + window.gtag("event", "promo_sign_up", { + send_to: "G-J6SQL5DF6V", + }); + } + } + + function clickedExploreLink() { + if (typeof window.gtag !== "undefined") { + window.gtag("event", "explore_click", { + app_name: "novodraft", + screen_name: "Home", + }); + } } async function saveUserData( @@ -340,11 +355,14 @@ const HomePage = () => { pleadings and briefs. Use it to augment your drafting as much or as little as you prefer.

-
- +
clickedExploreLink()} + > +
Explore Novodraft - +
diff --git a/src/styles/homepage.scss b/src/styles/homepage.scss index 6e9ee92..608bdec 100644 --- a/src/styles/homepage.scss +++ b/src/styles/homepage.scss @@ -109,6 +109,12 @@ section.section-1 { margin-right: 15px; } +.explore-link { + color: blue; + cursor: pointer; + font-weight: 500; +} + .card-link-box { display: flex; flex-direction: column; @@ -253,6 +259,7 @@ a.link:hover { img.img-1 { padding-left: 13px; + color: blue; } .section-3 {