Skip to content

Instantly share code, notes, and snippets.

@gilomen2
Last active April 14, 2017 15:35
Show Gist options
  • Save gilomen2/e7186b40e997e01b9f2f78fe0f007c68 to your computer and use it in GitHub Desktop.
Save gilomen2/e7186b40e997e01b9f2f78fe0f007c68 to your computer and use it in GitHub Desktop.
Current configuration
import './snowplow-distro';
if (!window['onespot_tracker']) {
window.GlobalSnowplowNamespace = window.GlobalSnowplowNamespace || [];
window.GlobalSnowplowNamespace.push('onespot_tracker');
window['onespot_tracker'] = function() { (window['onespot_tracker'].q = window['onespot_tracker'].q || []).push(arguments); };
window['onespot_tracker'].q = window['onespot_tracker'].q || [];
}
window.onespot_tracker('newTracker', 'client-javascript', 'sp.os-data.com', { // Initialise a tracker
appId: name,
platform: 'web',
cookieName: 'onspt',
post: true,
cookieLifetime: 86400 * 365 * 10,
contexts: {
webPage: true,
performanceTiming: true
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment