mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 23:27:12 +01:00
Accounts and login.
This commit is contained in:
parent
f3f0ad15f2
commit
49a55b40b4
22 changed files with 347 additions and 172 deletions
46
pages/test.js
Normal file
46
pages/test.js
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
import Head from 'next/head';
|
||||
import Link from 'next/link';
|
||||
import Layout from 'components/Layout';
|
||||
|
||||
export default function Test({ websiteId }) {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
{typeof window !== 'undefined' && (
|
||||
<script async defer data-website-id={websiteId} src="/umami.js" />
|
||||
)}
|
||||
</Head>
|
||||
<Layout>
|
||||
<p>
|
||||
Here you can test if your umami installation works. Open the network tab in your browser's
|
||||
developer console and watch for requests to the url <b>collect</b>. The links below should
|
||||
trigger page views. Clicking on the button should trigger an event.
|
||||
</p>
|
||||
<h2>Page links</h2>
|
||||
<Link href="?q=1">
|
||||
<a>Page One</a>
|
||||
</Link>
|
||||
<br />
|
||||
<Link href="?q=2">
|
||||
<a>Page Two</a>
|
||||
</Link>
|
||||
<h2>Events</h2>
|
||||
<button
|
||||
id="primary-button"
|
||||
className="otherClass umami--click--primary-button"
|
||||
type="button"
|
||||
>
|
||||
Button
|
||||
</button>
|
||||
</Layout>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export async function getStaticProps() {
|
||||
return {
|
||||
props: {
|
||||
websiteId: process.env.TEST_WEBSITE_ID,
|
||||
},
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue