Skip to content

Commit c037c68

Browse files
author
Jesse Seldess
authored
Merge pull request cockroachdb#3189 from cockroachdb/drift-on-docs
Add drift script to docs site
2 parents 16de687 + 0e940b3 commit c037c68

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

_includes/drift.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- Start of Async Drift Code -->
2+
<script>
3+
!function() {
4+
var t;
5+
if (t = window.driftt = window.drift = window.driftt || [], !t.init) return t.invoked ? void (window.console && console.error && console.error("Drift snippet included twice.")) : (t.invoked = !0,
6+
t.methods = [ "identify", "config", "track", "reset", "debug", "show", "ping", "page", "hide", "off", "on" ],
7+
t.factory = function(e) {
8+
return function() {
9+
var n;
10+
return n = Array.prototype.slice.call(arguments), n.unshift(e), t.push(n), t;
11+
};
12+
}, t.methods.forEach(function(e) {
13+
t[e] = t.factory(e);
14+
}), t.load = function(t) {
15+
var e, n, o, i;
16+
e = 3e5, i = Math.ceil(new Date() / e) * e, o = document.createElement("script"),
17+
o.type = "text/javascript", o.async = !0, o.crossorigin = "anonymous", o.src = "https://js.driftt.com/include/" + i + "/" + t + ".js",
18+
n = document.getElementsByTagName("script")[0], n.parentNode.insertBefore(o, n);
19+
});
20+
}();
21+
drift.SNIPPET_VERSION = '0.3.1';
22+
drift.load('675uiinkxdsb');
23+
</script>
24+
<!-- End of Async Drift Code -->

_layouts/default.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
{% if page.twitter == true %}
3030
{% include twitter_analytics.html %}
3131
{% endif %}
32+
{% include drift.html %}
3233
</body>
3334
</html>

0 commit comments

Comments
 (0)