|
@@ -16,59 +16,13 @@ html(itemscope, itemtype='http://schema.org/Product')
|
|
|
|
|
|
|
|
- if (typeof(gaToken) != "undefined")
|
|
- if (typeof(gaToken) != "undefined")
|
|
|
script(type='text/javascript')
|
|
script(type='text/javascript')
|
|
|
- var _gaq = _gaq || [];
|
|
|
|
|
- _gaq.push(['_setAccount', '#{gaToken}']);
|
|
|
|
|
- _gaq.push(['_trackPageview']);
|
|
|
|
|
-
|
|
|
|
|
- (function() {
|
|
|
|
|
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
|
|
|
|
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
|
|
|
|
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
|
|
|
|
- })();
|
|
|
|
|
-
|
|
|
|
|
- // this is the new google analytics https://developers.google.com/analytics/devguides/collection/analyticsjs/
|
|
|
|
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
|
-
|
|
|
|
|
- ga('create', '#{gaToken}', 'auto');
|
|
|
|
|
|
|
+ ga('create', '#{gaToken}', 'sharelatex.com');
|
|
|
ga('send', 'pageview');
|
|
ga('send', 'pageview');
|
|
|
|
|
|
|
|
- - if (typeof(mixpanelToken) != "undefined")
|
|
|
|
|
- script(type="text/javascript")
|
|
|
|
|
- (function(c,a){window.mixpanel=a;var b,d,h,e;b=c.createElement("script");
|
|
|
|
|
- b.type="text/javascript";b.async=!0;b.src=("https:"===c.location.protocol?"https:":"http:")+
|
|
|
|
|
- '//cdn.mxpnl.com/libs/mixpanel-2.2.min.js';d=c.getElementsByTagName("script")[0];
|
|
|
|
|
- d.parentNode.insertBefore(b,d);a._i=[];a.init=function(b,c,f){function d(a,b){
|
|
|
|
|
- var c=b.split(".");2==c.length&&(a=a[c[0]],b=c[1]);a[b]=function(){a.push([b].concat(
|
|
|
|
|
- Array.prototype.slice.call(arguments,0)))}}var g=a;"undefined"!==typeof f?g=a[f]=[]:
|
|
|
|
|
- f="mixpanel";g.people=g.people||[];h=['disable','track','track_pageview','track_links',
|
|
|
|
|
- 'track_forms','register','register_once','unregister','identify','alias','name_tag',
|
|
|
|
|
- 'set_config','people.set','people.increment','people.track_charge','people.append'];
|
|
|
|
|
- for(e=0;e<h.length;e++)d(g,h[e]);a._i.push([b,c,f])};a.__SV=1.2;})(document,window.mixpanel||[]);
|
|
|
|
|
- mixpanel.init("#{mixpanelToken}");
|
|
|
|
|
-
|
|
|
|
|
- - if (typeof(justRegistered) != "undefined" && justRegistered)
|
|
|
|
|
- script(type="text/javascript")
|
|
|
|
|
- mixpanel.alias("#{mixpanelId}");
|
|
|
|
|
- mixpanel.track("registered");
|
|
|
|
|
- mixpanel.name_tag("#{user.email}");
|
|
|
|
|
- mixpanel.people.set({
|
|
|
|
|
- $email: "#{user.email}",
|
|
|
|
|
- $first_name: "#{user.first_name}",
|
|
|
|
|
- $last_name: "#{user.last_name}",
|
|
|
|
|
- $created: new Date(#{Date.now()})
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- - if (typeof(mixpanelId) != "undefined")
|
|
|
|
|
- script(type="text/javascript")
|
|
|
|
|
- mixpanel.identify("#{mixpanelId}");
|
|
|
|
|
-
|
|
|
|
|
- - if (typeof(justLoggedIn) != "undefined" && justLoggedIn)
|
|
|
|
|
- script(type="text/javascript")
|
|
|
|
|
- mixpanel.track("Logged in");
|
|
|
|
|
-
|
|
|
|
|
script
|
|
script
|
|
|
window.csrfToken = "#{csrfToken}";
|
|
window.csrfToken = "#{csrfToken}";
|
|
|
|
|
|