@james-surfside/browser-core
v3.5.0
Published
Core functionality for Surfside Digital trackers
Downloads
187
Readme
Surfside Browser Tracker Core
Setup repository
npm install -g @microsoft/rush
git clone https://github.com/snowplow/snowplow-javascript-tracker.git
rush update
Building Browser Tracker Core
cd libraries/browser-core
rushx build
Running tests
rushx test
Package Installation
With npm:
npm install @james-surfside/browser-core
Usage
import { addTracker, createSharedState, getTracker } from '@james-surfside/browser-core';
const sharedState = createSharedState();
const tracker = addTracker('surfside', 'surf', 'js-3.0.0', '{{collector}}', sharedState, {}); // Also stores reference at module level
const sameTracker = getTracker('surfside');
Example
const domainUserId = tracker.getDomainUserId();
Copyright and license
Licensed and distributed under the BSD 3-Clause License (An OSI Approved License).
Copyright (c) 2022 Surfside Solutions Inc, Snowplow Analytics Ltd, 2010 Anthon Pang.
All rights reserved.