mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 16:17:13 +01:00
Fixed console command. Updated packages.
This commit is contained in:
parent
9118f24668
commit
d501410a63
5 changed files with 371 additions and 281 deletions
|
|
@ -21,8 +21,12 @@ export function TestConsole({ websiteId }: { websiteId: string }) {
|
|||
router.push(`/console/${value}`);
|
||||
}
|
||||
|
||||
function handleClick() {
|
||||
window['umami'].track({ url: '/page-view', referrer: 'https://www.google.com' });
|
||||
function handleRunScript() {
|
||||
window['umami'].track(props => ({
|
||||
...props,
|
||||
url: '/page-view',
|
||||
referrer: 'https://www.google.com',
|
||||
}));
|
||||
window['umami'].track('track-event-no-data');
|
||||
window['umami'].track('track-event-with-data', {
|
||||
test: 'test-data',
|
||||
|
|
@ -44,7 +48,7 @@ export function TestConsole({ websiteId }: { websiteId: string }) {
|
|||
});
|
||||
}
|
||||
|
||||
function handleIdentifyClick() {
|
||||
function handleRunIdentify() {
|
||||
window['umami'].identify({
|
||||
userId: 123,
|
||||
name: 'brian',
|
||||
|
|
@ -145,10 +149,10 @@ export function TestConsole({ websiteId }: { websiteId: string }) {
|
|||
</div>
|
||||
<div className={styles.group}>
|
||||
<div className={styles.header}>Javascript events</div>
|
||||
<Button id="manual-button" variant="primary" onClick={handleClick}>
|
||||
<Button id="manual-button" variant="primary" onClick={handleRunScript}>
|
||||
Run script
|
||||
</Button>
|
||||
<Button id="manual-button" variant="primary" onClick={handleIdentifyClick}>
|
||||
<Button id="manual-button" variant="primary" onClick={handleRunIdentify}>
|
||||
Run identify
|
||||
</Button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue