3.1.0 • Published 9 years ago

segmentio-snippet v3.1.0

Weekly downloads
106
License
-
Repository
github
Last release
9 years ago

Circle CI

snippet

Render the analytics.js snippet.

Example

var snippet = require('snippet');

var contents = snippet.max({
  host: 'cdn.segment.com',
  apiKey: '03fwkuu3',
  page: {
    category: 'Docs',
    name: 'Integrations',
    properties: {
      foo: 'bar'
    }
  }
});

API

snippet.max(options)

Returns the maxified version of the analytics.js snippet given a set of options:

  • host: the domain name where the analytics.js script is hosted
  • apiKey: the apiKey to load in the snippet
  • page: the options to pass to analytics.page. if page is false, then the page() call will be omitted

snippet.min(options)

Returns the minified version of the snippet.

3.1.0

9 years ago

3.0.1

10 years ago

3.0.0

10 years ago

2.1.1

10 years ago

2.1.0

10 years ago

2.0.9

11 years ago

2.0.8

11 years ago

2.0.7

11 years ago

2.0.6

11 years ago

2.0.5

11 years ago

2.0.4

11 years ago