chore: added session recorder key to env (#827)

This commit is contained in:
Aaryan Khandelwal 2023-04-14 16:51:24 +05:30 committed by GitHub
parent 5848c326c7
commit 23b4145565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -13,7 +13,7 @@ class MyDocument extends Document {
<link rel="apple-touch-icon" href="/icon.png" />
<meta name="theme-color" content="#fff" />
<script defer data-domain="app.plane.so" src="https://plausible.io/js/script.js" />
{isSessionRecorderEnabled && (
{isSessionRecorderEnabled && process.env.NEXT_PUBLIC_SESSION_RECORDER_KEY && (
<script
defer
dangerouslySetInnerHTML={{
@ -21,7 +21,7 @@ class MyDocument extends Document {
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "g6lhwgkmrp");`,
})(window, document, "clarity", "script", "${process.env.NEXT_PUBLIC_SESSION_RECORDER_KEY}");`,
}}
/>
)}

View File

@ -14,7 +14,8 @@
"NEXT_PUBLIC_TRACK_EVENTS",
"TRACKER_ACCESS_KEY",
"NEXT_PUBLIC_CRISP_ID",
"NEXT_PUBLIC_ENABLE_SESSION_RECORDER"
"NEXT_PUBLIC_ENABLE_SESSION_RECORDER",
"NEXT_PUBLIC_SESSION_RECORDER_KEY"
],
"pipeline": {
"build": {