Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 632 Bytes

README.md

File metadata and controls

31 lines (23 loc) · 632 Bytes

@umami/node

Installation

npm install @umami/node

Usage

import umami from '@umami/node';

umami.init({
  websiteId: '50429a93-8479-4073-be80-d5d29c09c2ec', // Your website id
  hostUrl: 'https://umami.mywebsite.com' // URL to your Umami instance
});

umami.track({ url: '/home' });

The properties you can send using the .track function are:

  • hostname: Hostname of server
  • language: Client language (eg. en-US)
  • referrer: Page referrer
  • screen: Screen dimensions (eg. 1920x1080)
  • title: Page title
  • url: Page url
  • name: Event name (for custom events)
  • data: Event data properties