mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 21:01:33 +02:00
Initial Countly integration.
This commit is contained in:
@@ -59,6 +59,27 @@ html(itemscope, itemtype='http://schema.org/Product')
|
||||
email: "#{session.user.email}",
|
||||
})
|
||||
// End Heap Analytics
|
||||
|
||||
// Countly Analytics
|
||||
if (settings.analytics && settings.analytics.countly && settings.analytics.countly.token)
|
||||
script(type="text/javascript").
|
||||
var Countly = Countly || {};
|
||||
Countly.q = Countly.q || [];
|
||||
Countly.app_key = "#{settings.analytics.countly.token}";
|
||||
Countly.url = "https://try.count.ly";
|
||||
Countly.q.push(['track_sessions']);
|
||||
Countly.q.push(['track_pageview']);
|
||||
|
||||
(function() {
|
||||
var cly = document.createElement('script'); cly.type = 'text/javascript';
|
||||
cly.async = true;
|
||||
//enter url of script here
|
||||
cly.src = 'https://cdnjs.cloudflare.com/ajax/libs/countly-sdk-web/16.6.0/countly.min.js';
|
||||
cly.onload = function(){Countly.init()};
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(cly, s);
|
||||
})();
|
||||
|
||||
// End countly Analytics
|
||||
|
||||
script(type="text/javascript").
|
||||
window.csrfToken = "#{csrfToken}";
|
||||
|
||||
Reference in New Issue
Block a user