-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
App router migration analytics (#1123)
* Add basic Root Layout * Add metadata * Add reference included by next * Add comment to explain the default meta tags * Add public testing page to check the migration * Remove non required file * Create Analytics component * Add analytics to root layout * Update layout.tsx --------- Co-authored-by: eleanorreem <eleanor.reem@hotmail.co.uk>
- Loading branch information
1 parent
bf7c899
commit db8dd34
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Analytics as VercelAnalytics } from '@vercel/analytics/react'; | ||
import { Hotjar } from 'nextjs-hotjar'; | ||
|
||
export default function Analytics() { | ||
return ( | ||
<> | ||
{!!process.env.NEXT_PUBLIC_HOTJAR_ID && process.env.NEXT_PUBLIC_ENV !== 'local' && ( | ||
<Hotjar id={process.env.NEXT_PUBLIC_HOTJAR_ID} sv={6} strategy="lazyOnload" /> | ||
)} | ||
<VercelAnalytics /> | ||
</> | ||
); | ||
} |