snippet
Render the analytics.js snippet.
Example
var snippet = ; var contents = snippet;
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 hostedapiKey
: theapiKey
to load in the snippetpage
: the options to pass toanalytics.page
. ifpage
isfalse
, then thepage()
call will be omitted
snippet.min(options)
Returns the minified version of the snippet.