From be77d5924fe2462dfcc94f50c6cdec4166059962 Mon Sep 17 00:00:00 2001 From: musiur Date: Tue, 21 Jan 2025 01:18:12 +0600 Subject: [PATCH] update datalayer --- src/app/_utils/calendly.tsx | 2 -- src/app/_utils/herosection.tsx | 4 ---- src/app/joining/_utils/google-ads-form.tsx | 12 +++++------ .../joining/_utils/google-analytics-form.tsx | 12 +++++------ .../_utils/shopify-development-form.tsx | 12 +++++------ .../joining/_utils/social-media-paid-ads.tsx | 12 +++++------ .../_utils/software-development-form.tsx | 12 +++++------ src/app/joining/_utils/uiux-form.tsx | 12 +++++------ .../joining/_utils/web-development-form.tsx | 12 +++++------ .../_utils/wordpress-development-form.tsx | 12 +++++------ .../components/data-layer-pusher-link.tsx | 21 +++++++++++++++++++ .../_utils/components/data-layer-pusher.tsx | 20 ++++++++++++++++++ .../_utils/sections/free-online-dialogue.tsx | 7 ++----- .../meet-with-yeatiq/_utils/sections/hero.tsx | 6 ++---- src/app/page.tsx | 4 ++-- src/components/molecule/get-consultation.tsx | 20 ++++++++++++++---- src/components/ui/aurora-background.tsx | 2 +- 17 files changed, 112 insertions(+), 70 deletions(-) create mode 100644 src/app/meet-with-yeatiq/_utils/components/data-layer-pusher-link.tsx create mode 100644 src/app/meet-with-yeatiq/_utils/components/data-layer-pusher.tsx diff --git a/src/app/_utils/calendly.tsx b/src/app/_utils/calendly.tsx index a6f6429..858b69d 100644 --- a/src/app/_utils/calendly.tsx +++ b/src/app/_utils/calendly.tsx @@ -1,8 +1,6 @@ "use client"; import SectionHead from "@/components/molecule/section-head"; -import Script from "next/script"; -import { InlineWidget } from "react-calendly"; import NeetoCal from "./neetocal"; const Calendly = () => { diff --git a/src/app/_utils/herosection.tsx b/src/app/_utils/herosection.tsx index 584ee7a..3dfe6a7 100644 --- a/src/app/_utils/herosection.tsx +++ b/src/app/_utils/herosection.tsx @@ -1,9 +1,5 @@ "use client"; -import Image from "next/image"; import { ReactElement } from "react"; - -import { BrandCarousel } from "@/app/_utils/carousel"; -import VideoPlayer from "@/app/_utils/video-player"; import GetConsultation from "@/components/molecule/get-consultation"; import GetAQuote from "@/components/molecule/get-a-quote"; import ANIM__FadeInOnScroll from "@/components/anims/fadein.anim"; diff --git a/src/app/joining/_utils/google-ads-form.tsx b/src/app/joining/_utils/google-ads-form.tsx index c184316..027eb0c 100644 --- a/src/app/joining/_utils/google-ads-form.tsx +++ b/src/app/joining/_utils/google-ads-form.tsx @@ -46,15 +46,15 @@ function GoogleAdsForm() { DL___FormData( data, - "joiningGoogleAdsFormSubmission", - "joining_google_ads_form_submission" + "joiningFormSubmission", + "google_ads" ); router.push("/joining/end?type=googleads"); } else { DL___FormData( data, - "joiningGoogleAdsFormAbandoned", - "joining_google_ads_form_abandoned" + "joiningFormAbandoned", + "google_ads" ); } } @@ -65,8 +65,8 @@ function GoogleAdsForm() { useEffect(() => { DL___FormData( form.getValues(), - "joiningGoogleAdsFormProcessing", - "joining_google_ads_form_processing" + "joiningFormProcessing", + "google_ads" ); }, [form.getValues()]); diff --git a/src/app/joining/_utils/google-analytics-form.tsx b/src/app/joining/_utils/google-analytics-form.tsx index 5218ec5..ecd39c4 100644 --- a/src/app/joining/_utils/google-analytics-form.tsx +++ b/src/app/joining/_utils/google-analytics-form.tsx @@ -46,15 +46,15 @@ function GoogleAnalyticsForm() { DL___FormData( form.getValues(), - "joiningGoogleAnalyticsFormSubmission", - "joining_google_analytics_form_submission" + "joiningFormSubmission", + "google_analytics" ); router.push("/joining/end?type=googleanalytics"); } else { DL___FormData( form.getValues(), - "joiningGoogleAnalyticsFormAbandoned", - "joining_google_analytics_form_abandoned" + "joiningFormAbandoned", + "google_analytics" ); } } @@ -65,8 +65,8 @@ function GoogleAnalyticsForm() { useEffect(() => { DL___FormData( form.getValues(), - "joiningGoogleAnalyticsFormProcessing", - "joining_google_analytics_form_processing" + "joiningFormProcessing", + "google_analytics" ); }, [form.getValues()]); diff --git a/src/app/joining/_utils/shopify-development-form.tsx b/src/app/joining/_utils/shopify-development-form.tsx index dd03343..6ad5a75 100644 --- a/src/app/joining/_utils/shopify-development-form.tsx +++ b/src/app/joining/_utils/shopify-development-form.tsx @@ -46,15 +46,15 @@ function ShopifyDevelopmentForm() { DL___FormData( form.getValues(), - "joiningShopifyFormSubmission", - "joining_shopify_form_submission" + "joiningFormSubmission", + "shopify" ); router.push("/joining/end?type=shopify"); } else { DL___FormData( form.getValues(), - "joiningShopifyFormAbandoned", - "joining_shopify_form_abandoned" + "joiningFormAbandoned", + "shopify" ); } } @@ -65,8 +65,8 @@ function ShopifyDevelopmentForm() { useEffect(() => { DL___FormData( form.getValues(), - "joiningShopifyFormProcessing", - "joining_shopify_form_processing" + "joiningFormProcessing", + "shopify" ); }, [form.getValues()]); diff --git a/src/app/joining/_utils/social-media-paid-ads.tsx b/src/app/joining/_utils/social-media-paid-ads.tsx index 5b12e49..3c3d57b 100644 --- a/src/app/joining/_utils/social-media-paid-ads.tsx +++ b/src/app/joining/_utils/social-media-paid-ads.tsx @@ -49,15 +49,15 @@ function SocialMediaPaidAdsForm() { DL___FormData( form.getValues(), - "joiningSocialMediaAdsFormSubmission", - "joining_social_media_ads_form_submission" + "joiningFormSubmission", + "social_media_ads" ); router.push("/joining/end?type=socialmediapaidads"); } else { DL___FormData( form.getValues(), - "joiningSocialMediaAdsFormAbandoned", - "joining_social_media_ads_form_abandoned" + "joiningFormAbandoned", + "social_media_ads" ); } } @@ -68,8 +68,8 @@ function SocialMediaPaidAdsForm() { useEffect(() => { DL___FormData( form.getValues(), - "joiningSocialMediaAdsFormProcessing", - "joining_social_media_ads_form_processing" + "joiningFormProcessing", + "social_media_ads" ); }, [form.getValues()]); diff --git a/src/app/joining/_utils/software-development-form.tsx b/src/app/joining/_utils/software-development-form.tsx index 0547d5b..f2b0059 100644 --- a/src/app/joining/_utils/software-development-form.tsx +++ b/src/app/joining/_utils/software-development-form.tsx @@ -46,15 +46,15 @@ function SoftwareDevelopmentForm() { DL___FormData( form.getValues(), - "joiningSoftwareFormSubmission", - "joining_software_form_submission" + "joiningFormSubmission", + "software" ); router.push("/joining/end?type=software"); } else { DL___FormData( form.getValues(), - "joiningSoftwareFormAbandoned", - "joining_software_form_abandoned" + "joiningFormAbandoned", + "software" ); } } @@ -65,8 +65,8 @@ function SoftwareDevelopmentForm() { useEffect(() => { DL___FormData( form.getValues(), - "joiningSoftwareFormProcessing", - "joining_software_form_processing" + "joiningFormProcessing", + "software" ); }, [form.getValues()]); diff --git a/src/app/joining/_utils/uiux-form.tsx b/src/app/joining/_utils/uiux-form.tsx index 57f9f5f..d6fbb71 100644 --- a/src/app/joining/_utils/uiux-form.tsx +++ b/src/app/joining/_utils/uiux-form.tsx @@ -47,15 +47,15 @@ function UiUxForm() { DL___FormData( form.getValues(), - "joiningUiUxFormSubmission", - "joining_uiux_form_submission" + "joiningFormSubmission", + "uiux" ); router.push("/joining/end?type=uiux"); } else { DL___FormData( form.getValues(), - "joiningUiUxFormAbandoned", - "joining_uiux_form_abandoned" + "joiningFormAbandoned", + "uiux" ); } } @@ -66,8 +66,8 @@ function UiUxForm() { useEffect(() => { DL___FormData( form.getValues(), - "joiningUiUxFormProcessing", - "joining_ui_ux_form_processing" + "joiningFormProcessing", + "ui_ux" ); }, [form.getValues()]); diff --git a/src/app/joining/_utils/web-development-form.tsx b/src/app/joining/_utils/web-development-form.tsx index bb5a584..874c47f 100644 --- a/src/app/joining/_utils/web-development-form.tsx +++ b/src/app/joining/_utils/web-development-form.tsx @@ -47,15 +47,15 @@ function WebDevelopmentForm() { DL___FormData( form.getValues(), - "joiningWebFormSubmission", - "joining_web_form_submission" + "joiningFormSubmission", + "web" ); router.push("/joining/end?type=customwebdev"); } else { DL___FormData( form.getValues(), - "joiningWebFormAbandoned", - "joining_web_form_abandoned" + "joiningFormAbandoned", + "web" ); } } @@ -66,8 +66,8 @@ function WebDevelopmentForm() { useEffect(() => { DL___FormData( form.getValues(), - "joiningWebFormSubmissionProcessing", - "joining_web_form_submission_processing" + "joiningFormProcessing", + "web" ); }, [form.getValues()]); diff --git a/src/app/joining/_utils/wordpress-development-form.tsx b/src/app/joining/_utils/wordpress-development-form.tsx index 65be06d..6acf0f5 100644 --- a/src/app/joining/_utils/wordpress-development-form.tsx +++ b/src/app/joining/_utils/wordpress-development-form.tsx @@ -47,15 +47,15 @@ function WordpressDevelopmentForm() { DL___FormData( form.getValues(), - "joiningWordpressFormSubmission", - "joining_wordpress_form_submission" + "joiningFormSubmission", + "wordpress" ); router.push("/joining/end?type=wordpress"); } else { DL___FormData( form.getValues(), - "joiningWordpressFormAbandoned", - "joining_Wordpress_form_abandoned" + "joiningFormAbandoned", + "wordpress" ); } } @@ -66,8 +66,8 @@ function WordpressDevelopmentForm() { useEffect(() => { DL___FormData( form.getValues(), - "joiningWordpressFormProcessing", - "joining_wordpress_form_processing" + "joiningFormProcessing", + "wordpress" ); }, [form.getValues()]); diff --git a/src/app/meet-with-yeatiq/_utils/components/data-layer-pusher-link.tsx b/src/app/meet-with-yeatiq/_utils/components/data-layer-pusher-link.tsx new file mode 100644 index 0000000..6397307 --- /dev/null +++ b/src/app/meet-with-yeatiq/_utils/components/data-layer-pusher-link.tsx @@ -0,0 +1,21 @@ +"use client"; + +import ShimmerButton from "@/components/magicui/shimmer-button"; +import { useRouter } from "next/navigation"; + +const DataLayerPusherLink = () => { + const router = useRouter(); + const handleDataLayerPusher = () => { + window.dataLayer.push({ + event: "book_free_strategy_session_button_click", + }); + router.push("/meet-with-yeatiq/#contact"); + }; + return ( +
+ Book Your Free Strategy Session Now! +
+ ); +}; + +export default DataLayerPusherLink; diff --git a/src/app/meet-with-yeatiq/_utils/components/data-layer-pusher.tsx b/src/app/meet-with-yeatiq/_utils/components/data-layer-pusher.tsx new file mode 100644 index 0000000..629b61a --- /dev/null +++ b/src/app/meet-with-yeatiq/_utils/components/data-layer-pusher.tsx @@ -0,0 +1,20 @@ +"use client"; +import { Button } from "@/components/ui/button"; +import { useRouter } from "next/navigation"; + +const DataLayerPusher = () => { + const router = useRouter(); + const handleDataLayerPusher = () => { + window.dataLayer.push({ + event: "free_online_session_button_click", + }); + router.push("/get-a-quote"); + }; + return ( + + ); +}; + +export default DataLayerPusher; diff --git a/src/app/meet-with-yeatiq/_utils/sections/free-online-dialogue.tsx b/src/app/meet-with-yeatiq/_utils/sections/free-online-dialogue.tsx index 61be015..eb7cb74 100644 --- a/src/app/meet-with-yeatiq/_utils/sections/free-online-dialogue.tsx +++ b/src/app/meet-with-yeatiq/_utils/sections/free-online-dialogue.tsx @@ -3,18 +3,15 @@ import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, - DialogDescription, - DialogFooter, - DialogHeader, - DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; +import DataLayerPusher from "../components/data-layer-pusher"; export function FreeOnlineDialogue() { return ( - + diff --git a/src/app/meet-with-yeatiq/_utils/sections/hero.tsx b/src/app/meet-with-yeatiq/_utils/sections/hero.tsx index f97828a..6fada99 100644 --- a/src/app/meet-with-yeatiq/_utils/sections/hero.tsx +++ b/src/app/meet-with-yeatiq/_utils/sections/hero.tsx @@ -1,7 +1,7 @@ import ShimmerButton from "@/components/magicui/shimmer-button"; -import { Button } from "@/components/ui/button"; import Link from "next/link"; import { FreeOnlineDialogue } from "./free-online-dialogue"; +import DataLayerPusherLink from "../components/data-layer-pusher-link"; const LandingHeroSection = () => { return ( @@ -17,9 +17,7 @@ const LandingHeroSection = () => { glowing reviews, ready to help your business grow.

- - Book Your Free Strategy Session Now! - +
diff --git a/src/app/page.tsx b/src/app/page.tsx index 89ee6a9..a28dd4d 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -12,7 +12,7 @@ import HeroSection from "./_utils/herosection"; import Faq from "./_utils/faq"; import { BrandCarousel } from "./_utils/carousel"; -const Home = () => { +const HomePage = () => { return (
{ ); }; -export default Home; +export default HomePage; diff --git a/src/components/molecule/get-consultation.tsx b/src/components/molecule/get-consultation.tsx index 3ef4431..d47b122 100644 --- a/src/components/molecule/get-consultation.tsx +++ b/src/components/molecule/get-consultation.tsx @@ -1,11 +1,23 @@ -import Link from "next/link"; +"use client"; import { Button } from "../ui/button"; +import { useRouter } from "next/navigation"; const GetConsultation = () => { + const router = useRouter(); + const handleLinkClick = () => { + router.push("/#calendly"); + window.dataLayer.push({ + event: "get_a_free_consultation_button_click", + }); + }; return ( - - - + ); }; diff --git a/src/components/ui/aurora-background.tsx b/src/components/ui/aurora-background.tsx index ea116e3..da1a4e6 100644 --- a/src/components/ui/aurora-background.tsx +++ b/src/components/ui/aurora-background.tsx @@ -22,7 +22,7 @@ export const AuroraBackground = ({ )} {...props} > -
+