Skip to content

Commit

Permalink
Implement Posthog across all layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
sharad-s committed Sep 26, 2024
1 parent 4fae54a commit 5c61e2d
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 27 deletions.
21 changes: 21 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/Posthog.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
// src/components/posthog.astro
// src/components/PostHog.astro
---

<script is:inline>
Expand Down
4 changes: 4 additions & 0 deletions src/layouts/BaseHtml.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Nav from '@components/NavBar';
import Footer from '@components/Footer';
import { Toaster } from 'react-hot-toast';
import PostHog from '@components/PostHog.astro';
interface Props {
title: string;
Expand Down Expand Up @@ -103,6 +104,9 @@ const baseUrl = getSiteUrl();

<!-- Google Tag Manager -->
<script is:inline src="/lib/gtm.js"></script>

<!-- PostHog -->
<PostHog />
</head>
<body
class="--font-plex-sans --font-plex-mono --font-sans bg-mesh min-h-full bg-black font-sans text-gray-dark-11 selection:bg-yellow-dark-9 selection:text-black"
Expand Down
5 changes: 4 additions & 1 deletion src/layouts/LandingPage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import '@styles/globals.css';
import { getSiteUrl } from '@utils/url';
import settings from '@base/settings.json';
import PostHog from '@components/PostHog.astro';
const baseUrl = getSiteUrl();
---

Expand Down Expand Up @@ -79,6 +79,9 @@ const baseUrl = getSiteUrl();

<!-- Google Tag Manager -->
<script is:inline src="/lib/gtm.js"></script>

<!-- PostHog -->
<PostHog />
</head>
<body
class="relative flex min-h-dvh flex-col overflow-x-hidden bg-black font-sans text-gray-dark-11 selection:bg-yellow-dark-9 selection:text-black"
Expand Down
1 change: 0 additions & 1 deletion src/layouts/Page.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
import '@styles/globals.css';
import BaseHtml from './BaseHtml.astro';
import PostHogLayout from '@layouts/PosthogLayout.astro';
interface Props {
title: string;
Expand Down
8 changes: 0 additions & 8 deletions src/layouts/PosthogLayout.astro

This file was deleted.

28 changes: 12 additions & 16 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,17 @@ import ExplainerBlocks from '@components/ExplainerBlocks';
import PricingLanding from '@components/PricingLanding';
import ReadyToLive from '@components/ReadyToLive';
import Footer from '@components/v2/Footer/Footer';
import PostHogLayout from '@layouts/PosthogLayout.astro';
---

<PostHogLayout>
<LandingPageHtml>
<Navbar pathname={Astro.url.pathname} client:load />
<Hero client:load />
<Partners />
<DeployOnFleek />
<ImpressUsers />
<ExplainerBlocks />
<PricingLanding />
<BuildUseCases />
<ReadyToLive />
<Footer />
</LandingPageHtml>
<PostHogLayout /></PostHogLayout
>
<LandingPageHtml>
<Navbar pathname={Astro.url.pathname} client:load />
<Hero client:load />
<Partners />
<DeployOnFleek />
<ImpressUsers />
<ExplainerBlocks />
<PricingLanding />
<BuildUseCases />
<ReadyToLive />
<Footer />
</LandingPageHtml>

0 comments on commit 5c61e2d

Please sign in to comment.