added tag conversion
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
import React from "react";
|
|
||||||
import { cn } from "@/lib/utils";
|
|
||||||
import {
|
import {
|
||||||
getPhoneNumber,
|
|
||||||
getContactLink,
|
getContactLink,
|
||||||
|
getPhoneNumber,
|
||||||
TRANSITION_ALL,
|
TRANSITION_ALL,
|
||||||
} from "@/lib/constants";
|
} from "@/lib/constants";
|
||||||
|
import { cn } from "@/lib/utils";
|
||||||
import { PhoneCall } from "lucide-react";
|
import { PhoneCall } from "lucide-react";
|
||||||
|
import React from "react";
|
||||||
import Title from "./atoms/title";
|
import Title from "./atoms/title";
|
||||||
|
|
||||||
interface CallNowDialogProps {
|
interface CallNowDialogProps {
|
||||||
@@ -21,6 +21,13 @@ function CallNowDialog({ page }: CallNowDialogProps) {
|
|||||||
setOpen(true);
|
setOpen(true);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const handleClick = () => {
|
||||||
|
// @ts-ignore
|
||||||
|
if (typeof gtag_report_conversion === "function") {
|
||||||
|
gtag_report_conversion();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return open ? (
|
return open ? (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
@@ -38,6 +45,7 @@ function CallNowDialog({ page }: CallNowDialogProps) {
|
|||||||
"flex items-center gap-4 rounded-full bg-lime-700 px-8 py-6 text-lime-50",
|
"flex items-center gap-4 rounded-full bg-lime-700 px-8 py-6 text-lime-50",
|
||||||
)}
|
)}
|
||||||
href={contactLink}
|
href={contactLink}
|
||||||
|
onClick={handleClick}
|
||||||
>
|
>
|
||||||
<PhoneCall className="h-8 w-auto" />
|
<PhoneCall className="h-8 w-auto" />
|
||||||
<p className="text-xl font-semibold">{phoneNumber}</p>
|
<p className="text-xl font-semibold">{phoneNumber}</p>
|
||||||
|
|||||||
@@ -43,7 +43,10 @@ import MaxWidthWrapper from "./other/max.width.wrapper";
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col sm:flex-row gap-4">
|
<div class="flex flex-col sm:flex-row gap-4">
|
||||||
<a href={CONTACT_LINK}>
|
<a
|
||||||
|
href={CONTACT_LINK}
|
||||||
|
onclick="if (typeof gtag_report_conversion === 'function') { gtag_report_conversion(); }"
|
||||||
|
>
|
||||||
<Button
|
<Button
|
||||||
size={"lg"}
|
size={"lg"}
|
||||||
className="w-full sm:w-max"
|
className="w-full sm:w-max"
|
||||||
|
|||||||
@@ -1,12 +1,20 @@
|
|||||||
import { contactLinks } from "@/lib/constants";
|
import { contactLinks } from "@/lib/constants";
|
||||||
|
|
||||||
function Partners() {
|
function Partners() {
|
||||||
|
const handleClick = () => {
|
||||||
|
// @ts-ignore
|
||||||
|
if (typeof gtag_report_conversion === "function") {
|
||||||
|
gtag_report_conversion();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex w-full flex-col items-center justify-center gap-8 rounded-xl p-8 md:flex-row md:flex-wrap md:justify-around">
|
<div className="flex w-full flex-col items-center justify-center gap-8 rounded-xl p-8 md:flex-row md:flex-wrap md:justify-around">
|
||||||
<a
|
<a
|
||||||
href={contactLinks.spectrum}
|
href={contactLinks.spectrum}
|
||||||
data-aos="zoom-in-left"
|
data-aos="zoom-in-left"
|
||||||
data-aos-duration="500"
|
data-aos-duration="500"
|
||||||
|
onClick={handleClick}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
src={"/assets/spectrum.png"}
|
src={"/assets/spectrum.png"}
|
||||||
@@ -18,6 +26,7 @@ function Partners() {
|
|||||||
href={contactLinks.optimum}
|
href={contactLinks.optimum}
|
||||||
data-aos="zoom-in"
|
data-aos="zoom-in"
|
||||||
data-aos-duration="500"
|
data-aos-duration="500"
|
||||||
|
onClick={handleClick}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
src={"/assets/optimum.png"}
|
src={"/assets/optimum.png"}
|
||||||
|
|||||||
@@ -20,8 +20,15 @@ export default function CallButton({
|
|||||||
rounded,
|
rounded,
|
||||||
page,
|
page,
|
||||||
}: CallButtonProps) {
|
}: CallButtonProps) {
|
||||||
|
const handleClick = () => {
|
||||||
|
// @ts-ignore
|
||||||
|
if (typeof gtag_report_conversion === "function") {
|
||||||
|
gtag_report_conversion();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<a href={getContactLink(page)}>
|
<a href={getContactLink(page)} onClick={handleClick}>
|
||||||
<Button
|
<Button
|
||||||
size="lg"
|
size="lg"
|
||||||
variant={variant}
|
variant={variant}
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ const contactLink = getContactLink(page);
|
|||||||
<a
|
<a
|
||||||
href={contactLink}
|
href={contactLink}
|
||||||
class="text-blue-50 hover:text-blue-100"
|
class="text-blue-50 hover:text-blue-100"
|
||||||
|
onclick="if (typeof gtag_report_conversion === 'function') { gtag_report_conversion(); }"
|
||||||
>
|
>
|
||||||
{phoneNumber}
|
{phoneNumber}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -107,7 +107,17 @@ function Navbar({
|
|||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
<a href={getContactLink(page)}>
|
<a
|
||||||
|
href={getContactLink(page)}
|
||||||
|
onClick={() => {
|
||||||
|
// @ts-ignore
|
||||||
|
if (
|
||||||
|
typeof gtag_report_conversion === "function"
|
||||||
|
) {
|
||||||
|
gtag_report_conversion();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Button
|
<Button
|
||||||
variant={variant}
|
variant={variant}
|
||||||
className="w-full"
|
className="w-full"
|
||||||
|
|||||||
@@ -45,6 +45,23 @@ const page = "default";
|
|||||||
window.gtag("config", "AW-17772291743");
|
window.gtag("config", "AW-17772291743");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script is:inline>
|
||||||
|
window.gtag_report_conversion = function (url) {
|
||||||
|
var callback = function () {
|
||||||
|
if (typeof url != "undefined") {
|
||||||
|
window.location = url;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
gtag("event", "conversion", {
|
||||||
|
send_to: "AW-17772291743/bFAiCOHr3eYbEJ_NvppC",
|
||||||
|
value: 1.0,
|
||||||
|
currency: "USD",
|
||||||
|
event_callback: callback,
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta
|
<meta
|
||||||
name="viewport"
|
name="viewport"
|
||||||
|
|||||||
Reference in New Issue
Block a user