Skip to content

Commit

Permalink
Merge pull request #824 from makeplane/feat/session_recorder
Browse files Browse the repository at this point in the history
feat: session recorder
  • Loading branch information
vamsi authored Apr 14, 2023
2 parents 3d6f2dd + 2950877 commit 3817511
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
4 changes: 3 additions & 1 deletion apps/app/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ NEXT_PUBLIC_GITHUB_APP_NAME=""
NEXT_PUBLIC_GITHUB_ID=""
NEXT_PUBLIC_SENTRY_DSN=""
NEXT_PUBLIC_ENABLE_OAUTH=0
NEXT_PUBLIC_ENABLE_SENTRY=0
NEXT_PUBLIC_ENABLE_SENTRY=0
NEXT_PUBLIC_ENABLE_SESSION_RECORDER=0
NEXT_PUBLIC_TRACK_EVENTS=0
16 changes: 16 additions & 0 deletions apps/app/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,29 @@ import Document, { Html, Head, Main, NextScript } from "next/document";

class MyDocument extends Document {
render() {
const isSessionRecorderEnabled = parseInt(
process.env.NEXT_PUBLIC_ENABLE_SESSION_RECORDER || "0"
);

return (
<Html>
<Head>
<link rel="manifest" href="/manifest.json" />
<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 && (
<script
defer
dangerouslySetInnerHTML={{
__html: `(function(c,l,a,r,i,t,y){
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");`,
}}
/>
)}
</Head>
<body>
<Main />
Expand Down
3 changes: 2 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"NEXT_PUBLIC_UNSPLASH_ACCESS",
"NEXT_PUBLIC_TRACK_EVENTS",
"TRACKER_ACCESS_KEY",
"NEXT_PUBLIC_CRISP_ID"
"NEXT_PUBLIC_CRISP_ID",
"NEXT_PUBLIC_ENABLE_SESSION_RECORDER"
],
"pipeline": {
"build": {
Expand Down

1 comment on commit 3817511

@vercel
Copy link

@vercel vercel bot commented on 3817511 Apr 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

plane – ./apps/app

plane-git-master-caravel.vercel.app
plane-theta.vercel.app
plane-caravel.vercel.app
app.plane.so

Please sign in to comment.