cartodb-4.42/lib/assets/javascripts/cartodb/common/views/vendor_scripts.jst.ejs
2024-04-06 05:25:13 +00:00

55 lines
2.4 KiB
Plaintext

<% if (trackjsEnabled) { %>
<script type='text/javascript'>
window._trackJs = {
enabled: true,
application: '<%= trackjsAppKey %>',
version: '<%= assetsVersion %>',
userId: '<%= userName %>',
token: '<%= trackjsCustomer %>'
};
</script>
<script
type='text/javascript'
src='//d2zah9y47r7bi2.cloudfront.net/releases/current/tracker.js'
data-token='<%= trackjsCustomer %>'>
</script>
<% } %>
<% if (intercomEnabled) { %>
<script type='text/javascript'>
window.intercomSettings = {
app_id: '<%= intercomAppId %>',
email: '<%= userEmail %>'
};
</script>
<script type='text/javascript'>
(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/<%= intercomAppId %>';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>
<% } %>
<% if (fullstoryEnabled) { %>
<script type='text/javascript'>
window['_fs_debug'] = false;
window['_fs_host'] = 'www.fullstory.com';
window['_fs_org'] = '<%= fullstoryOrg %>';
window['_fs_namespace'] = 'FS';
(function(m,n,e,t,l,o,g,y){
if (e in m && m.console && m.console.log) { m.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].'); return;}
g=m[e]=function(a,b){g.q?g.q.push([a,b]):g._api(a,b);};g.q=[];
o=n.createElement(t);o.async=1;o.src='https://'+_fs_host+'/s/fs.js';
y=n.getElementsByTagName(t)[0];y.parentNode.insertBefore(o,y);
g.identify=function(i,v){g(l,{uid:i});if(v)g(l,v)};g.setUserVars=function(v){g(l,v)};
g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};
g.clearUserCookie=function(c,d,i){if(!c || document.cookie.match('fs_uid=[`;`]*`[`;`]*`[`;`]*`')){
d=n.domain;while(1){n.cookie='fs_uid=;domain='+d+
';path=/;expires='+new Date(0).toUTCString();i=d.indexOf('.');if(i<0)break;d=d.slice(i+1)}}};
})(window,document,window['_fs_namespace'],'script','user');
FS.clearUserCookie();
FS.identify('<%= userName %>', {
displayName: '<%= userName %>',
email: '<%= userEmail %>'
});
</script>
<% } %>