UNPKG

@ref247/tracker-embed

Version:

Ref247.io tracker embed script for your websites!

31 lines (22 loc) 730 B
# @ref247/tracker Official client-side SDK for tracking affiliate clicks and page views with [Ref247.io](https://ref247.io). ## ✨ Features - Automatic fingerprinting with FingerprintJS - Simple API to track clicks or page views - Optional DOM-based tracking by selector - Lightweight and framework-agnostic ## 📦 Installation ```bash npm install @ref247/tracker-embed ``` ## Usage Example ``` import { Ref247Tracker } from '@ref247/tracker'; const tracker = await Ref247Tracker.init(); tracker.trackPageView('https://example.com/landing'); tracker.trackClick('https://example.com/signup'); // Or bind to a DOM element: tracker.trackOnClick('#cta-button', { linkUri: 'EXMP-2321' }); ```