-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathconfig.js
More file actions
55 lines (46 loc) · 1.63 KB
/
config.js
File metadata and controls
55 lines (46 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
angular.module('ngSegment').constant('segmentDefaultConfig', {
// API key: The https://segment.com API key to be used when loading analytics.js.
// Must be set before loading the analytics.js script.
apiKey: null,
// Autoload: if true, analytics.js will be asynchronously
// loaded after the app's .config() cycle has ended
autoload: true,
// Load delay: number of milliseconds to defer loading
// analytics.js.
loadDelay: 0,
// Condition: callback function to be checked before making an API call
// against segment. Can be dependency-injected, and is passed the method name
// and arguments of the analytics.js call being made. Useful for disabling
// certain or all analytics.js functionality for certain users or in certain
// application states.
condition: null,
// Debug: turns debug statements on/off. Useful during development.
debug: false,
// Allowed values:
// - string (in which case it will be interpreted as a name of a
// service debug messages will be emitted with, E.g. `$log`)
// - object
logger: '$log',
// Decides which method of the logger to use if debug is turned on.
debugLevel: 'log',
// Methods: the analytics.js methods that the service creates queueing stubs for.
methods: [
'trackSubmit',
'trackClick',
'trackLink',
'trackForm',
'pageview',
'identify',
'reset',
'group',
'track',
'ready',
'alias',
'page',
'once',
'off',
'on',
],
// Tag: the tag used in debug log statements
tag: '[ngSegment] ',
});