Quick Start
Install and configure the Grovs Web SDK in your project
Installation
Bash
npm install grovs --saveSetup
Import and initialize the SDK:
import Grovs from 'grovs';
const grovs = new Grovs('your-api-key', (data) => {
// Called when a matching link is detected
console.log('Link data:', data);
});
// Start the SDK
grovs.start();User identity
Set user information for attribution and analytics:
grovs.setUserIdentifier('user-123');
grovs.setUserAttributes({
name: 'Jane Doe',
email: '[email protected]',
plan: 'premium',
});Retrieve current values:
const userId = grovs.userIdentifier();
const attrs = grovs.userAttributes();