-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlytix-adobe.js
37 lines (31 loc) · 928 Bytes
/
lytix-adobe.js
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
/**
* @license
* Lytix Adobe Analytics (Omniture) Adapter
* https://github.com/websperts/lytix
*
* Copyright (c) 2015 websperts <[email protected]>
* Licensed under the MIT license.
* https://github.com/websperts/lytix/blob/master/LICENSE
*/
(function(lytix) {
'use strict';
lytix.trackPage = function(path) {
if (window.s) {
s.t([path]);
}
};
lytix.trackEvent = function(properties) {
if (window.s) {
if (properties.action) {
if (properties.action.toLowerCase() === 'download') {
s.tl(this, 'd', properties.action);
} else if (properties.action.toLowerCase() === 'exit') {
s.tl(this, 'e', properties.action);
} else {
s.tl(this, 'o', properties.action);
}
}
}
};
lytix.init();
})(window.lytix);