Skip to content

Commit

Permalink
chore: add siteimprove to storefront (#2462)
Browse files Browse the repository at this point in the history
Add the Siteimprove script tag and remove Vercel analytics. The
Siteimprove tag should only be loaded when the Storefront is deployed
from the main branch (production).

---------

Co-authored-by: Tobias Barsnes <[email protected]>
  • Loading branch information
Thunear and Barsnes authored Sep 19, 2024
1 parent 8c3b10c commit d2b7a4d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/storefront/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import '@digdir/designsystemet-css';
import '@digdir/designsystemet-theme';

import { Header } from '@repo/components';
import { Analytics } from '@vercel/analytics/react';
import type { Metadata } from 'next';

import { VersionBanner } from '@components';
import Script from 'next/script';
import { Footer } from '../components/Footer/Footer';

export const metadata: Metadata = {
Expand Down Expand Up @@ -62,7 +62,9 @@ export default function RootLayout({
<Header menu={menu} />
{children}
<Footer />
<Analytics />
{process.env.VERCEL_GIT_COMMIT_REF === 'next' && (
<Script src='https://siteimproveanalytics.com/js/siteanalyze_6255470.js' />
)}
</div>
</body>
</html>
Expand Down

0 comments on commit d2b7a4d

Please sign in to comment.