Add umami analytics
This commit is contained in:
@@ -3,6 +3,8 @@ APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
UMAMI_SRC=
|
||||
UMAMI_WEBSITE_ID=
|
||||
|
||||
APP_LOCALE=en
|
||||
APP_FALLBACK_LOCALE=en
|
||||
@@ -62,4 +64,4 @@ AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=
|
||||
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 { Head } from '@inertiajs/react';
|
||||
|
||||
interface AppLayoutProps {
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
export default ({ children }: AppLayoutProps) =>
|
||||
(<>
|
||||
<Head>
|
||||
</Head>
|
||||
{children}
|
||||
</>);
|
||||
export default ({ children }: AppLayoutProps) => {
|
||||
return <>{children}</>;
|
||||
};
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
@viteReactRefresh
|
||||
@vite(['resources/js/app.tsx', "resources/js/pages/{$page['component']}.tsx"])
|
||||
@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>
|
||||
<body class="font-sans antialiased">
|
||||
@inertia
|
||||
|
||||
Reference in New Issue
Block a user