JavaScript

JavaScript SDK

The SDK is designed for seamless integration with JavaScript-based frameworks like Angular, React, and Vue, enabling you to track user interactions, custom events, and page views effectively.

Installation

Install the Evntaly JavaScript SDK using npm:

Initialization

Initialize the SDK with your Developer Secret and Project Token - Check Here

Tracking Events

For custom event tracking, use the track method.

User Identification

Identify a user to associate events with a specific profile.

Enabling and Disabling Tracking

You can enable or disable event tracking globally.


Integration with Frontend Frameworks

Angular

React

Vue

Methods

Method
Description
Example Usage
Available Since

track

Tracks a custom event.

evntaly.track({title: 'Event'})

v1.0.0

identifyUser

Identifies a user for analytics.

evntaly.identifyUser({id: 'user-123'})

v1.0.0

disableTracking

Disables all event tracking.

evntaly.disableTracking()

v1.0.0

enableTracking

Enables all event tracking.

evntaly.enableTracking()

v1.0.0

checkLimit

Checks API usage limits.

await evntaly.checkLimit()

v1.0.0

Best Practices

  • Initialize early: Always initialize the SDK as early as possible.

  • Avoid sensitive data: Do not pass sensitive personal data directly to the SDK.

  • Monitor API limits: Regularly check API limits to avoid missing critical events.

Troubleshooting

  • Events not appearing: Check if the SDK is initialized correctly and the API tokens are valid.

  • Network errors: Ensure your network allows requests to https://evntaly.com.


Support

For additional help, contact support at support@evntaly.com.

Last updated