Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
add GTM analytics module
Browse files Browse the repository at this point in the history
  • Loading branch information
ereburg committed Sep 11, 2023
1 parent 5456d78 commit c1fe9e8
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
13 changes: 13 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"react-datepicker": "4.15.0",
"react-dom": "18.2.0",
"react-dropzone": "14.2.3",
"react-gtm-module": "2.0.11",
"react-router": "6.15.0",
"react-router-dom": "6.15.0",
"react-scripts": "5.0.1",
Expand All @@ -40,6 +41,7 @@
"@types/node": "18.17.14",
"@types/react-datepicker": "4.11.2",
"@types/react-dom": "18.2.7",
"@types/react-gtm-module": "2.0.1",
"eslint-config-airbnb": "19.0.4",
"eslint-config-airbnb-typescript": "17.1.0",
"eslint-config-prettier": "8.8.0",
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import { createRoot } from 'react-dom/client';
import TagManager from 'react-gtm-module';
import { App } from '@/App';

import './styles/global.scss';

if (process.env.NODE_ENV === 'production') {
TagManager.initialize({
gtmId: 'GTM-5H6FVXRQ',
});
}

const container = document.getElementById('root');
const root = createRoot(container as Element);

Expand Down
13 changes: 0 additions & 13 deletions frontend/src/reportWebVitals.js

This file was deleted.

0 comments on commit c1fe9e8

Please sign in to comment.