docs: integrate google analytics (#10526)
This commit is contained in:
1 parent
de81187929
commit
0c1bbbac2a
19 files changed
+156
-93
No files matched your search
@@ -39,7 +39,7 @@
|
||||
"clsx": "^2.0.0",
|
||||
"cpy-cli": "^5.0.0",
|
||||
"eslint": "^9.13.0",
|
||||
"next": "15.0.1",
|
||||
"next": "15.0.4",
|
||||
"rimraf": "^5.0.1",
|
||||
"tailwind": "*",
|
||||
"tailwindcss": "^3.3.3",
|
||||
@@ -59,6 +59,7 @@
|
||||
"@emotion/is-prop-valid": "^1.3.1",
|
||||
"@medusajs/icons": "^2.0.0",
|
||||
"@medusajs/ui": "^4.0.0",
|
||||
"@next/third-parties": "15.0.4",
|
||||
"@octokit/request": "^8.1.1",
|
||||
"@react-hook/resize-observer": "^1.2.6",
|
||||
"@segment/analytics-next": "^1.75.0",
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
import clsx from "clsx"
|
||||
import React from "react"
|
||||
import { GoogleAnalytics } from "@next/third-parties/google"
|
||||
|
||||
export type BareboneLayoutProps = {
|
||||
htmlClassName?: string
|
||||
children: React.ReactNode
|
||||
gaId?: string
|
||||
}
|
||||
|
||||
export const BareboneLayout = ({
|
||||
htmlClassName,
|
||||
children,
|
||||
gaId,
|
||||
}: BareboneLayoutProps) => {
|
||||
return (
|
||||
<html lang="en" className={clsx("h-full w-full", htmlClassName)}>
|
||||
<head />
|
||||
{children}
|
||||
<GoogleAnalytics gaId={gaId || "temp"} />
|
||||
</html>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user