more
This commit is contained in:
@@ -32,8 +32,8 @@
|
|||||||
function gtag() {
|
function gtag() {
|
||||||
dataLayer.push(arguments);
|
dataLayer.push(arguments);
|
||||||
}
|
}
|
||||||
gtag("js", new Date());
|
|
||||||
|
|
||||||
|
gtag("js", new Date());
|
||||||
gtag("config", "G-J6SQL5DF6V");
|
gtag("config", "G-J6SQL5DF6V");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,26 @@ const HomePage = () => {
|
|||||||
? process.env.REACT_APP_API_DEV
|
? process.env.REACT_APP_API_DEV
|
||||||
: process.env.REACT_APP_API_PROD;
|
: 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(
|
async function saveUserData(
|
||||||
authId,
|
authId,
|
||||||
dataValues,
|
dataValues,
|
||||||
@@ -111,6 +131,7 @@ const HomePage = () => {
|
|||||||
try {
|
try {
|
||||||
const usersRef = collection(db, "users");
|
const usersRef = collection(db, "users");
|
||||||
const res = await setDoc(doc(usersRef, fbAuthUid), userData);
|
const res = await setDoc(doc(usersRef, fbAuthUid), userData);
|
||||||
|
promoSignup();
|
||||||
return res;
|
return res;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(`Error saving new user to db: ${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);
|
setShowPromoModal(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user