Adding intercom
parent
c320a358db
commit
c1309b7509
|
@ -259,5 +259,31 @@
|
|||
document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if request.user.is_authenticated %}
|
||||
<script id="IntercomSettingsScriptTag">
|
||||
var intercomSettings = {
|
||||
app_id: 'sajf131y',
|
||||
email: '{{ request.user.email }}',
|
||||
created_at: {{ request.user.date_joined|date:"U" }}
|
||||
};
|
||||
</script>
|
||||
<script>
|
||||
(function() {
|
||||
function async_load() {
|
||||
var s = document.createElement('script');
|
||||
s.type = 'text/javascript'; s.async = true;
|
||||
s.src = 'https://api.intercom.io/api/js/library.js';
|
||||
var x = document.getElementsByTagName('script')[0];
|
||||
x.parentNode.insertBefore(s, x);
|
||||
}
|
||||
if (window.attachEvent) {
|
||||
window.attachEvent('onload', async_load);
|
||||
} else {
|
||||
window.addEventListener('load', async_load, false);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue