How to use the keen-tracking.utils function in keen-tracking

To help you get started, we’ve selected a few keen-tracking examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github keen / keen-tracking.js / docs / examples / angular / keen-angular-example / src / app / keen.service.ts View on Github external
this.client = new Keen({
      projectId,
      writeKey
    });

    if (!environment.production) {
      Keen.enabled = false;
      Keen.debug = true;
  
      this.client.on('recordEvent', (event, data) => {
        console.log('event:', event);
        console.log('data:', data);
      });
    }

    const timer = Keen.utils.timer();
    timer.start();
    
    // Batch-record events every 5s
    this.client.queueInterval(5);

    this.client.extendEvents(() => {
      return {
        geo: {
          info: { /* Enriched */ },
          ip_address: '${keen.ip}',
        },
        page: {
          info: { /* Enriched */ },
          title: document.title,
          url: document.location.href
        },

keen-tracking

Track events - custom user actions, clicks, pageviews, purchases.

MIT
Latest version published 3 years ago

Package Health Score

57 / 100
Full package analysis