Skip to content

Commit

Permalink
Merge pull request #232 from elmadev/dev
Browse files Browse the repository at this point in the history
feat(other): add hotjar
  • Loading branch information
sunehs authored May 18, 2024
2 parents 32b701b + dbaf58a commit a90172d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/deployment-live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
sed -i "s|'test/'|${{ secrets.S3_SUB_FOLDER_LIVE }}|g" src/config.js
sed -i "s|${url}u/|${{ secrets.UP_LIVE }}|g" src/config.js
sed -i "s|6Le-n9QUAAAAAG-3bYyysXddxwD6I6iJeDBTHf2r|${{ secrets.RECAPTCHA_LIVE }}|g" src/config.js
sed -i "s|hotJarId: 0|hotJarId: ${{ secrets.HOTJAR }}|g" src/config.js
- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"dependencies": {
"@fingerprintjs/fingerprintjs": "^3.4.0",
"@hotjar/browser": "^1.0.9",
"@kevinwolf/formal-web": "^0.1.3",
"@material-ui/core": "4.11.3",
"@material-ui/icons": "^4.11.2",
Expand Down
9 changes: 8 additions & 1 deletion src/app.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
import React from 'react';
import React, { useEffect } from 'react';
import { StoreProvider, createStore } from 'easy-peasy';
import { HelmetProvider } from 'react-helmet-async';
import Router from './router';
import model from './easypeasy';
import { queryClient } from './react-query';
import { QueryClientProvider } from 'react-query';
import Hotjar from '@hotjar/browser';
import config from 'config';

const easyPeasyStore = createStore(model, {
version: 2,
});

function App() {
useEffect(() => {
if (config.hotJarId) {
Hotjar.init(config.hotJarId, 6);
}
}, []);
return (
<StoreProvider store={easyPeasyStore}>
<QueryClientProvider client={queryClient}>
Expand Down
1 change: 1 addition & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const config = {
recaptcha: '6Le-n9QUAAAAAG-3bYyysXddxwD6I6iJeDBTHf2r',
maxUploadSize: 10485760,
s3Url: `https://space.elma.online/${s3SubFolder}`,
hotJarId: 0,
};

export default config;
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2031,6 +2031,11 @@
dependencies:
"@hapi/hoek" "^8.3.0"

"@hotjar/browser@^1.0.9":
version "1.0.9"
resolved "https://registry.yarnpkg.com/@hotjar/browser/-/browser-1.0.9.tgz#769b4ded3fa7b9557b785c107f0cd76d3f83789a"
integrity sha512-n9akDMod8BLGpYEQCrHwlYWWd63c1HlhUSXNIDfClZtKYXbUjIUOFlNZNNcUxgHTCsi4l2i+SWKsGsO0t93S8w==

"@icons/material@^0.2.4":
version "0.2.4"
resolved "https://registry.yarnpkg.com/@icons/material/-/material-0.2.4.tgz#e90c9f71768b3736e76d7dd6783fc6c2afa88bc8"
Expand Down

0 comments on commit a90172d

Please sign in to comment.