From 71e6f6b70601a5a6fa20645c2f01a6bf9f7b19ff Mon Sep 17 00:00:00 2001
From: "tri.susilo" <tri.susilo@altama.co.id>
Date: Mon, 29 Apr 2024 13:02:14 +0700
Subject: google tag

---
 src-migrate/modules/product-detail/components/ProductDetail.tsx | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src-migrate/modules/product-detail/components/ProductDetail.tsx')

diff --git a/src-migrate/modules/product-detail/components/ProductDetail.tsx b/src-migrate/modules/product-detail/components/ProductDetail.tsx
index 3b1bdbea..bfdf5b43 100644
--- a/src-migrate/modules/product-detail/components/ProductDetail.tsx
+++ b/src-migrate/modules/product-detail/components/ProductDetail.tsx
@@ -23,6 +23,8 @@ import SimilarBottom from './SimilarBottom'
 import SimilarSide from './SimilarSide'
 import VariantList from './VariantList'
 
+import { gtagProductDetail } from '@/core/utils/googleTag'
+
 type Props = {
   product: IProductDetail
 }
@@ -34,6 +36,10 @@ const ProductDetail = ({ product }: Props) => {
   const router = useRouter()
   const { setAskAdminUrl, askAdminUrl, activeVariantId } = useProductDetail()
 
+  useEffect(() => {
+    gtagProductDetail(product);
+  },[product])
+
   useEffect(() => {
     const createdAskUrl = whatsappUrl({
       template: 'product',
-- 
cgit v1.2.3

