Add umami analytics
This commit is contained in:
@@ -3,6 +3,8 @@ APP_ENV=local
|
|||||||
APP_KEY=
|
APP_KEY=
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
APP_URL=http://localhost
|
APP_URL=http://localhost
|
||||||
|
UMAMI_SRC=
|
||||||
|
UMAMI_WEBSITE_ID=
|
||||||
|
|
||||||
APP_LOCALE=en
|
APP_LOCALE=en
|
||||||
APP_FALLBACK_LOCALE=en
|
APP_FALLBACK_LOCALE=en
|
||||||
@@ -62,4 +64,4 @@ AWS_DEFAULT_REGION=us-east-1
|
|||||||
AWS_BUCKET=
|
AWS_BUCKET=
|
||||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||||
|
|
||||||
VITE_APP_NAME="${APP_NAME}"
|
VITE_APP_NAME="${APP_NAME}"
|
||||||
@@ -35,4 +35,9 @@ return [
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'umami' => [
|
||||||
|
'src' => env('UMAMI_SRC'),
|
||||||
|
'website_id' => env('UMAMI_WEBSITE_ID'),
|
||||||
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
import { type ReactNode } from 'react';
|
import { type ReactNode } from 'react';
|
||||||
import { Head } from '@inertiajs/react';
|
|
||||||
|
|
||||||
interface AppLayoutProps {
|
interface AppLayoutProps {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ({ children }: AppLayoutProps) =>
|
export default ({ children }: AppLayoutProps) => {
|
||||||
(<>
|
return <>{children}</>;
|
||||||
<Head>
|
};
|
||||||
</Head>
|
|
||||||
{children}
|
|
||||||
</>);
|
|
||||||
|
|||||||
@@ -24,6 +24,10 @@
|
|||||||
@viteReactRefresh
|
@viteReactRefresh
|
||||||
@vite(['resources/js/app.tsx', "resources/js/pages/{$page['component']}.tsx"])
|
@vite(['resources/js/app.tsx', "resources/js/pages/{$page['component']}.tsx"])
|
||||||
@inertiaHead
|
@inertiaHead
|
||||||
|
|
||||||
|
@if(config('services.umami.src') && config('services.umami.website_id'))
|
||||||
|
<script defer src="{{ config('services.umami.src') }}" data-website-id="{{ config('services.umami.website_id') }}"></script>
|
||||||
|
@endif
|
||||||
</head>
|
</head>
|
||||||
<body class="font-sans antialiased">
|
<body class="font-sans antialiased">
|
||||||
@inertia
|
@inertia
|
||||||
|
|||||||
Reference in New Issue
Block a user