Skip to content

Commit 9be0cd0

Browse files
authored
Merge pull request #2066 from IFRCGo/feature/hotjar-vite-integration
Integrate hotjar using vite plugin radar
2 parents 85c2f97 + cc7fa84 commit 9be0cd0

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
lines changed

.changeset/three-jars-rhyme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"go-web-app": patch
3+
---
4+
5+
Integrate hotjar

app/env.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@ export default defineConfig({
2626
APP_SENTRY_REPLAYS_SESSION_SAMPLE_RATE: Schema.number.optional(),
2727
APP_SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE: Schema.number.optional(),
2828
APP_GOOGLE_ANALYTICS_ID: Schema.string.optional(),
29+
30+
// FIXME this should be number
31+
APP_HOTJAR_ID: Schema.string.optional(),
2932
});

app/vite.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ValidateEnv as validateEnv } from '@julr/vite-plugin-validate-env';
2+
import { isDefined } from '@togglecorp/fujs';
23
import { defineConfig, loadEnv } from 'vite';
34
import tsconfigPaths from 'vite-tsconfig-paths';
45
import webfontDownload from 'vite-plugin-webfont-dl';
@@ -52,6 +53,9 @@ export default defineConfig(({ mode }) => {
5253
analytics: {
5354
id: env.APP_GOOGLE_ANALYTICS_ID,
5455
},
56+
hotjar: isDefined(env.APP_HOTJAR_ID) ? ({
57+
id: Number(env.APP_HOTJAR_ID),
58+
}) : undefined,
5559
})
5660
],
5761
css: {

nginx-serve/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ENV APP_TINY_API_KEY=APP_TINY_API_KEY_PLACEHOLDER
2929
ENV APP_API_ENDPOINT=https://APP-API-ENDPOINT-PLACEHOLDER.COM/
3030
ENV APP_RISK_API_ENDPOINT=https://APP-RISK-API-ENDPOINT-PLACEHOLDER.COM/
3131
ENV APP_SDT_URL=https://APP-SDT-URL-PLACEHOLDER.COM/
32-
ENV APP_SENTRY_DSN=https://APP-SENTRY-DSN-PLACEHOLDER.COM
32+
ENV APP_SENTRY_DSN=https://APP-SENTRY-DSN-PLACEHOLDER.COM/
3333

3434
# Static configs (Configured when building docker image)
3535
ARG APP_SENTRY_TRACES_SAMPLE_RATE=

0 commit comments

Comments
 (0)