Adding Drift.
parent
34c6a63fb3
commit
6657c4f301
|
@ -1,4 +1,4 @@
|
|||
{% load snipt_tags intercom %}
|
||||
{% load snipt_tags %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="{% block html-class %}{% endblock %}" ng-app="Snipt">
|
||||
|
@ -444,29 +444,30 @@
|
|||
</div>
|
||||
|
||||
{% if request.user.is_authenticated and not debug %}
|
||||
<!-- Start of Async Drift Code -->
|
||||
<script>
|
||||
window.intercomSettings = {
|
||||
app_id: 'sajf131y',
|
||||
user_id: {{ request.user.id }},
|
||||
user_hash: '{{ request.user.id|intercom_sha_256 }}',
|
||||
email: '{{ request.user.email }}',
|
||||
created_at: {{ request.user.date_joined|date:"U" }},
|
||||
custom_data: {
|
||||
'snipts count': {% snipts_count_for_user %},
|
||||
'profile link': 'https://snipt.net/{{ request.user.username }}/',
|
||||
'blog domain': '{{ request.user.profile.blog_domain }}',
|
||||
'pro date': {% firstof request.user.profile.pro_date|date:"U" 'null' %},
|
||||
'username': '{{ request.user.username }}'
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/sajf131y';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()</script>
|
||||
<script type="text/javascript">
|
||||
FS.identify('{{ request.user.id }}', {
|
||||
displayName: '{{ request.user.username }}',
|
||||
email: '{{ request.user.email }}'
|
||||
!function() {
|
||||
var t;
|
||||
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,
|
||||
t.methods = [ "identify", "config", "track", "reset", "debug", "show", "ping", "page", "hide", "off", "on" ],
|
||||
t.factory = function(e) {
|
||||
return function() {
|
||||
var n;
|
||||
return n = Array.prototype.slice.call(arguments), n.unshift(e), t.push(n), t;
|
||||
};
|
||||
}, t.methods.forEach(function(e) {
|
||||
t[e] = t.factory(e);
|
||||
}), t.load = function(t) {
|
||||
var e, n, o, i;
|
||||
e = 3e5, i = 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/" + i + "/" + t + ".js",
|
||||
n = document.getElementsByTagName("script")[0], n.parentNode.insertBefore(o, n);
|
||||
});
|
||||
}();
|
||||
drift.SNIPPET_VERSION = '0.3.0'
|
||||
drift.load('bx8pi58c2e5h')
|
||||
</script>
|
||||
<!-- End of Async Drift Code -->
|
||||
{% endif %}
|
||||
|
||||
{% include 'analytics.html' %}
|
||||
|
|
Loading…
Reference in New Issue