Streaming live at 10am (PST)

Appearing on scroll

#1

Hi there,

I’ve added the drift widget to one of my website. Currently it’s appearing with a delay of 10000ms, but I’d like to have it appear when scrolling 60% of the entire page. What do I have to add to the code to make it happen?

Thanks in advance. Here’s the current snippet I’m using in my code:
`
“use strict”;
//load after waiting 10000 milliseconds, 10 seconds
setTimeout(function(){
LoadDriftWidget()
}, 10000)
function LoadDriftWidget() {
var t = window.driftt = window.drift = window.driftt || ;
if (!t.init) {
if (t.invoked) return void (window.console && console.error && console.error(“Drift snippet included twice.”));
t.invoked = !0, t.methods = [ “identify”, “config”, “track”, “reset”, “debug”, “show”, “ping”, “page”, “hide”, “off”, “on” ],
t.factory = function(e) {
return function() {
var n = Array.prototype.slice.call(arguments);
return n.unshift(e), t.push(n), t;
};
}, t.methods.forEach(function(e) {
t[e] = t.factory(e);
}), t.load = function(t) {
var e = 3e5, n = Math.ceil(new Date() / e) * e, o = document.createElement(“script”);
o.type = “text/javascript”, o.async = !0, o.crossorigin = “anonymous”, o.src = “https://js.driftt.com/include/” + n + “/” + t + “.js”;
var i = document.getElementsByTagName(“script”)[0];
i.parentNode.insertBefore(o, i);
};
}
drift.SNIPPET_VERSION = ‘0.3.1’;
drift.load(‘mbm7m4d98sez’);
};

`