cartodb-4.42/app/views/shared/_trackjs.html.erb
2024-04-06 05:25:13 +00:00

19 lines
616 B
Plaintext

<script>
window._trackJs = {
enabled: <%= enabled ? 'true' : 'false' %>,
application: '<%= app_key %>',
version: '<%= version %>'
<% if current_user.present? %>
,userId: '<%= current_user.username %>'
<% end %>
<% if is_embed %>
,callback: { enabled: false },
console: { enabled: false, display: false },
network: { enabled: true },
window: { enabled: false },
visitor: { enabled: false }
<% end %>
};
</script>
<script type="text/javascript" src="//d2zah9y47r7bi2.cloudfront.net/releases/current/tracker.js" data-token="<%= customer %>"></script>