Skip to content

Commit 20eb200

Browse files
cannedyetiConnor Potebnya
andauthored
add snowplow analytics (#624)
Co-authored-by: Connor Potebnya <connor.potebnya@datarobot.com>
1 parent 17b12b8 commit 20eb200

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

_layouts/default.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,33 @@
127127
}
128128
});
129129
</script>
130+
<!-- Snowplow -->
131+
<script>
132+
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
133+
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
134+
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
135+
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//analytics.datarobot.com/sp.js","snowplow"));
136+
window.snowplow('newTracker', 'dr', 'analytics.datarobot.com', {
137+
appId: 'developers.algorithmia.com',
138+
discoverRootDomain: true,
139+
cookieName: 'datarobot_analytics',
140+
encodeBase64: false,
141+
respectDoNotTrack: false,
142+
userFingerprint: true,
143+
pageUnloadTimer: 0,
144+
forceSecureTracker: true,
145+
eventMethod: 'get',
146+
contexts: {
147+
webPage: true,
148+
performanceTiming: true,
149+
gaCookies: true,
150+
},
151+
});
152+
window.snowplow('enableActivityTracking', 1, 15);
153+
window.snowplow('trackPageView');
154+
window.snowplow('enableLinkClickTracking');
155+
window.snowplow('enableFormTracking');
156+
</script>
130157
<!-- END_SCRIPTS_EMBED -->
131158
</body>
132159
</html>

_layouts/nil.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,33 @@
108108
}
109109
});
110110
</script>
111+
<!-- Snowplow -->
112+
<script>
113+
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
114+
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
115+
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
116+
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//analytics.datarobot.com/sp.js","snowplow"));
117+
window.snowplow('newTracker', 'dr', 'analytics.datarobot.com', {
118+
appId: 'developers.algorithmia.com',
119+
discoverRootDomain: true,
120+
cookieName: 'datarobot_analytics',
121+
encodeBase64: false,
122+
respectDoNotTrack: false,
123+
userFingerprint: true,
124+
pageUnloadTimer: 0,
125+
forceSecureTracker: true,
126+
eventMethod: 'get',
127+
contexts: {
128+
webPage: true,
129+
performanceTiming: true,
130+
gaCookies: true,
131+
},
132+
});
133+
window.snowplow('enableActivityTracking', 1, 15);
134+
window.snowplow('trackPageView');
135+
window.snowplow('enableLinkClickTracking');
136+
window.snowplow('enableFormTracking');
137+
</script>
111138
<!-- END_SCRIPTS_EMBED -->
112139
</body>
113140
</html>

0 commit comments

Comments
 (0)