mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 17:15:37 +01:00
Refactor tracker.
This commit is contained in:
parent
2e22deb58a
commit
023adafa39
8 changed files with 85 additions and 136 deletions
|
|
@ -11,6 +11,12 @@ export default function Test() {
|
|||
return <h1>No id query specified.</h1>;
|
||||
}
|
||||
|
||||
function handleClick() {
|
||||
window.umami('Custom event');
|
||||
window.umami.pageView('/fake', 'https://www.google.com');
|
||||
window.umami.pageEvent('pageEvent', 'custom-type');
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
|
|
@ -20,7 +26,7 @@ export default function Test() {
|
|||
</Head>
|
||||
<Layout>
|
||||
<p>
|
||||
Here you can test if your umami installation works. Open the network tab in your browser's
|
||||
Here you can test if your umami installation works. Open the network tab in your browser
|
||||
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>
|
||||
|
|
@ -40,6 +46,10 @@ export default function Test() {
|
|||
>
|
||||
Button
|
||||
</button>
|
||||
<h2>Manual trigger</h2>
|
||||
<button id="manual-button" type="button" onClick={handleClick}>
|
||||
Button
|
||||
</button>
|
||||
</Layout>
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue