From c72953a401c2fbd765de3c5710a6cc29322c9cae Mon Sep 17 00:00:00 2001 From: mayuran-deriv-dev96 Date: Mon, 18 Dec 2023 08:31:32 +0400 Subject: [PATCH 1/5] fix: hot jar changes --- .github/workflows/beta.yml | 1 + .github/workflows/generate-preview-link.yml | 1 + .github/workflows/production.yml | 3 ++- .github/workflows/staging.yml | 2 ++ crowdin/messages.json | 12 +++++----- gatsby-browser.js | 2 +- gatsby-ssr.js | 22 +++++++++++++++++-- static/~partytown/debug/partytown-atomics.js | 16 +++++++------- static/~partytown/debug/partytown-media.js | 2 +- .../~partytown/debug/partytown-sandbox-sw.js | 16 +++++++------- static/~partytown/debug/partytown-sw.js | 4 ++-- .../~partytown/debug/partytown-ww-atomics.js | 19 +++++++--------- static/~partytown/debug/partytown-ww-sw.js | 19 +++++++--------- static/~partytown/debug/partytown.js | 13 ++++------- static/~partytown/partytown-atomics.js | 4 ++-- static/~partytown/partytown-media.js | 2 +- static/~partytown/partytown-sw.js | 4 ++-- static/~partytown/partytown.js | 4 ++-- 18 files changed, 79 insertions(+), 67 deletions(-) diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index ab380000f3f..1b482edd91e 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -23,6 +23,7 @@ env: GATSBY_RUDDERSTACK_STAGING_KEY: ${{ secrets.GATSBY_RUDDERSTACK_STAGING_KEY }} GATSBY_RUDDERSTACK_PRODUCTION_KEY: ${{ secrets.GATSBY_RUDDERSTACK_PRODUCTION_KEY }} GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID: ${{ secrets.GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID }} + GATSBY_HOTJAR_ID: ${{ secrets.GATSBY_HOTJAR_ID }} jobs: release-beta: diff --git a/.github/workflows/generate-preview-link.yml b/.github/workflows/generate-preview-link.yml index 7f6f7d4b1e1..f415de08ec7 100644 --- a/.github/workflows/generate-preview-link.yml +++ b/.github/workflows/generate-preview-link.yml @@ -130,6 +130,7 @@ jobs: GATSBY_STRAPI_TOKEN: ${{ secrets.GATSBY_STRAPI_TOKEN }} GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID: ${{ secrets.GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID }} GATSBY_TRUSTPILOT_API_KEY: ${{ secrets.GATSBY_TRUSTPILOT_API_KEY }} + GATSBY_HOTJAR_ID: ${{ secrets.GATSBY_HOTJAR_ID }} run: npm run build diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 33a790f8336..f8c85f08e1d 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -20,6 +20,7 @@ env: GATSBY_RUDDERSTACK_PRODUCTION_KEY: ${{ secrets.GATSBY_RUDDERSTACK_PRODUCTION_KEY }} GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID: ${{ secrets.GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID }} GATSBY_TRUSTPILOT_API_KEY: ${{ secrets.GATSBY_TRUSTPILOT_API_KEY }} + GATSBY_HOTJAR_ID: ${{ secrets.GATSBY_HOTJAR_ID }} jobs: release-production: @@ -52,7 +53,7 @@ jobs: - run: npm run test - run: npm run build - run: echo $GIT_TAG_NAME > public/version.txt - + - name: Remove Storybook uses: JesseTG/rm@v1.0.2 with: diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 5c3d3ce02fd..a1937a30ea9 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -25,6 +25,8 @@ env: GATSBY_STRAPI_TOKEN: ${{ secrets.GATSBY_STRAPI_TOKEN }} GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID: ${{ secrets.GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID }} GATSBY_TRUSTPILOT_API_KEY: ${{ secrets.GATSBY_TRUSTPILOT_API_KEY }} + GATSBY_HOTJAR_ID: ${{ secrets.GATSBY_HOTJAR_ID }} + jobs: release-staging: timeout-minutes: 30 diff --git a/crowdin/messages.json b/crowdin/messages.json index e58084bc37c..7e559417495 100644 --- a/crowdin/messages.json +++ b/crowdin/messages.json @@ -535,7 +535,6 @@ "517286342": "

To place a vanilla options contract, you’ll need to:

", "517833647": "Volatility 50 (1s) Index", "517844699": "Alibaba Group Holding Ltd", - "518861708": "Open a demo Deriv MT5 or demo Deriv X account and practise with an unlimited amount of virtual funds.", "518906831": "Can I use the same address to make a cryptocurrency deposit?", "519988278": "Fox Corp Class B", "520136698": "Boom 500 Index", @@ -4111,9 +4110,6 @@ "-2121510827": "Sweden", "-1357648282": "For fair resolution of any complaints, please <0>chat with us. To learn more, see our <1>complaint policy.", "-1838458999": "For fair resolution of any complaints, please <0>chat with us.", - "-1131400885": "Deriv Investments (Europe) Limited", - "-1231248751": "Deriv Investments (Europe) Limited (Company No. C 70156), incorporated on the 22nd April 2015, is registered in Malta with its registered office located at Level 3, W Business Centre, Triq Dun Karm, Birkirkara BKR9033, Malta. Deriv Investments (Europe) Ltd is licensed in Malta and regulated by the Malta Financial Services Authority under the Investments Services Act <0>(view licence) to provide investment services.", - "-2051445931": "Clients in the European Union who wish to trade financial instruments can have accounts under Deriv Investments (Europe) Limited.", "-1446148261": "CFDs - Forex", "-1121949345": "CFDs - Stock indices", "-33096025": "CFDs - Cryptocurrencies", @@ -4121,6 +4117,9 @@ "-1238176624": "CFDs - Synthetics: Volatility 250 (1s) Index", "-1076679821": "Multipliers - Cryptocurrencies", "-812435767": "Multipliers - Synthetics: Crash 300 Index", + "-1131400885": "Deriv Investments (Europe) Limited", + "-1231248751": "Deriv Investments (Europe) Limited (Company No. C 70156), incorporated on the 22nd April 2015, is registered in Malta with its registered office located at Level 3, W Business Centre, Triq Dun Karm, Birkirkara BKR9033, Malta. Deriv Investments (Europe) Ltd is licensed in Malta and regulated by the Malta Financial Services Authority under the Investments Services Act <0>(view licence) to provide investment services.", + "-2051445931": "Clients in the European Union who wish to trade financial instruments can have accounts under Deriv Investments (Europe) Limited.", "-112814932": "Deriv (FX) Ltd", "-1269257733": "Clients in the rest of the world (except for restricted countries such as the USA, Canada, and Hong Kong) who wish to trade CFDs on forex and cryptocurrencies can have MT5 Financial STP accounts under Deriv (FX) Ltd.", "-2019617323": "Deriv (BVI) Ltd", @@ -4210,6 +4209,9 @@ "-943253121": "The term ‘margin’ refers to the deposit needed to open a leveraged position, which is a position larger than your capital investment and leads to increased market exposure.", "-339497727": "Trade types margin market", "-1009744297": "Use our margin calculator to calculate the margin required to increase your market exposure (the market value of your position) on Deriv’s CFD trading platforms.", + "-1603400333": "Open a demo CFDs account and practise with an unlimited amount of virtual funds.", + "-446423672": "Open a demo Deriv MT5, Deriv X, or Deriv cTrader account and practise with an unlimited amount of virtual funds.", + "-1978157334": "Trade with a real Deriv MT5, Deriv X, or Deriv cTrader account and get access to high leverage to trade positions larger than your existing capital.", "-1207172200": "Start trading CFDs on Deriv", "-1703690406": "When you trade CFDs on margin, you increase your market exposure, thus amplifying both your potential profit and potential loss.", "-843831637": "Stop loss", @@ -4246,8 +4248,6 @@ "-894512007": "favourite markets icon", "-252740007": "instant access icon", "-1156092900": "flexible icon", - "-1603400333": "Open a demo CFDs account and practise with an unlimited amount of virtual funds.", - "-1242544018": "Trade with a real Deriv MT5 or real Deriv X account and get access to high leverage to trade positions larger than your existing capital.", "-544150655": "Markets available for margin trading", "-867909844": "Access over 30 assets and also trade with up to 1:30 leverage and zero commission on trades.", "-309438223": "Trade synthetic indices on margin 24/7 without being affected by natural events and liquidity risks.", diff --git a/gatsby-browser.js b/gatsby-browser.js index a53c3124d4a..eb944c5e985 100644 --- a/gatsby-browser.js +++ b/gatsby-browser.js @@ -103,7 +103,7 @@ export const onClientEntry = () => { device_language: navigator?.language || ' ', device_type: isMobile ? 'mobile' : 'desktop', }) - Analytics?.identifyEvent() + // Analytics?.identifyEvent() //datadog const dd_options = { clientToken: process.env.GATSBY_DATADOG_CLIENT_TOKEN, diff --git a/gatsby-ssr.js b/gatsby-ssr.js index 4a68d992d1d..6503698b852 100644 --- a/gatsby-ssr.js +++ b/gatsby-ssr.js @@ -12,7 +12,8 @@ export const wrapPageElement = WrapPagesWithLocaleContext export const onRenderBody = ({ setHeadComponents }) => { const gtmTrackingId = process.env.GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID || '' - + const hotjarId = process.env.GATSBY_HOTJAR_ID || '' // Add your Hotjar ID here + console.log(hotjarId, 'www') setHeadComponents([ // Partytown setup , @@ -51,5 +52,22 @@ export const onRenderBody = ({ setHeadComponents }) => { }} /> ), + + // Hotjar setup + hotjarId && ( +