remove mixpanel + add more matomo tracking

This commit is contained in:
Albert Yi
2018-11-09 15:34:16 -08:00
parent e69cbe7f81
commit c8793457cb
6 changed files with 36 additions and 21 deletions

View File

@@ -6,10 +6,14 @@
<% content_for(:html_header) do %>
<script>
$(function() {
if (typeof window.mixpanel === 'object') {
window.mixpanel.track_links('#sign-up-link', 'clicked sign up');
window.mixpanel.track_links('#hide-sign-up-notice', 'hide sign up notice');
}
$("#sign-up-link").click(function() {
window._paq = _paq || [];
window._paq.push(['trackEvent', 'clickedSignUpLink']);
});
$("#hide-sign-up-notice").click(function() {
window._paq = _paq || [];
window._paq.push(['trackEvent', 'clickedHideSignUpLink']);
});
});
</script>
<% end %>

View File

@@ -97,7 +97,7 @@
<%= f.input :disable_responsive_mode, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false, :hint => "Disable alternative layout for mobile and tablet" %>
<%= f.input :opt_out_mixpanel, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false, :hint => "Opt out of MixPanel tracking" %>
<%= f.input :opt_out_mixpanel, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false, :hint => "Opt out of tracking" %>
<%= f.input :custom_style, :label => "Custom <a href='https://en.wikipedia.org/wiki/Cascading_Style_Sheets'>CSS</a> style".html_safe, :hint => "Style to apply to the whole site.", :input_html => {:size => "40x5"} %>
</fieldset>