diff --git a/react-frontend/configs/dev.env b/react-frontend/configs/dev.env index 6821f837..d84becc5 100644 --- a/react-frontend/configs/dev.env +++ b/react-frontend/configs/dev.env @@ -1,2 +1,2 @@ REACT_APP_LUMBERJACK_API_URL="https://lumberjack.stage.razorpay.in/v1/track" -REACT_APP_LUMBERJACK_API_KEY='10pYUm55sa39zgTN1gzNwQzNyQjM54Cg' \ No newline at end of file +REACT_APP_LUMBERJACK_API_KEY='UHjKbQGfxNrh9p2Die2vcu06alGtijkj' \ No newline at end of file diff --git a/react-frontend/configs/prod.env b/react-frontend/configs/prod.env index a146594a..93316f47 100644 --- a/react-frontend/configs/prod.env +++ b/react-frontend/configs/prod.env @@ -1,2 +1,2 @@ REACT_APP_LUMBERJACK_API_URL="https://lumberjack.razorpay.com/v1/track" -REACT_APP_LUMBERJACK_API_KEY='10pYUm55sa39zgTN1gzNwQzNyQjM54Cg' \ No newline at end of file +REACT_APP_LUMBERJACK_API_KEY='FsXeGGD0S8uVBnfqlgkBXE4Ht2ZH9Y9c' \ No newline at end of file diff --git a/react-frontend/package.json b/react-frontend/package.json index f1076e4f..73dc48f8 100644 --- a/react-frontend/package.json +++ b/react-frontend/package.json @@ -28,7 +28,7 @@ "react-apexcharts": "^1.3.9", "react-dom": "^17.0.2", "react-router-dom": "^5.2.0", - "react-scripts": "4.0.3", + "react-scripts": "^5.0.1", "react-tooltip": "^4.2.21" }, "eslintConfig": { @@ -48,9 +48,5 @@ "last 1 firefox version", "last 1 safari version" ] - }, - "resolutions": { - "babel-loader": "8.1.0", - "webpack": "4.44.2" } } diff --git a/react-frontend/src/components/App.jsx b/react-frontend/src/components/App.jsx index 430c5939..4c64fb13 100644 --- a/react-frontend/src/components/App.jsx +++ b/react-frontend/src/components/App.jsx @@ -9,6 +9,7 @@ import { initLumberjack } from "../utils/trackers"; const App = () => { console.log(`Application running on ${process.env.NODE_ENV} mode.`); useEffect(() => { + console.log(navigator); initLumberjack(); }, []) diff --git a/react-frontend/src/components/ContentHeader.jsx b/react-frontend/src/components/ContentHeader.jsx index 31f0e315..ae7c5ffa 100644 --- a/react-frontend/src/components/ContentHeader.jsx +++ b/react-frontend/src/components/ContentHeader.jsx @@ -1,6 +1,15 @@ import React from "react"; +import { analyticsTrack } from "../utils/analytics"; const ContentHeader = () => { + const sendAnalytics = () => { + analyticsTrack({ + objectName: 'Support Page', + actionName: 'clicked', + screen: 'Home page' + }) + } + return (

@@ -13,6 +22,7 @@ const ContentHeader = () => { real-time, operational issue with one of our products that is not described below, please reach out to{" "} { } analyticsTrack({ - objectName: 'Test object', + objectName: 'Service Expand', actionName: 'clicked', screen: 'Home page' }) @@ -54,6 +54,12 @@ const GroupItem = ({ service, showPlusButton }) => { const closeCollapse = () => { setCollapse(false); + + analyticsTrack({ + objectName: 'Service Collapse', + actionName: 'clicked', + screen: 'Home page' + }) }; const handleMouseOver = (service) => { diff --git a/react-frontend/src/components/Navbar/index.js b/react-frontend/src/components/Navbar/index.js index ad9af689..72722079 100644 --- a/react-frontend/src/components/Navbar/index.js +++ b/react-frontend/src/components/Navbar/index.js @@ -6,10 +6,20 @@ import Button from "../Button"; import RzpLogo from "../../static/razorpay-logo-white.svg"; import indiaFlagSvg from "./images/india-flag.svg"; +import { analyticsTrack } from "../../utils/analytics"; -const RazorpayLogoLink = () => ( - { + const sendAnalytics = () => { + analyticsTrack({ + objectName: 'Home Page', + actionName: 'clicked', + screen: 'Home page' + }) + } + + return ( alt="Razorpay Logo" /> -); +}; + +const sendAnalytics = (event) => { + analyticsTrack({ + objectName: event.target.name, + actionName: 'clicked', + screen: 'Home page' + }) +} const Navigation = () => { return ( @@ -67,7 +85,10 @@ const Navigation = () => {