eliminate mixpanel references

This commit is contained in:
Albert Yi
2019-01-23 16:37:44 -08:00
parent 60f0aeeb99
commit 17ae357da9
8 changed files with 5 additions and 59 deletions

View File

@@ -87,11 +87,11 @@
$(window).trigger("danbooru:error", msg);
}
window._paq = window._paq || [];
<% if CurrentUser.is_member? && !CurrentUser.opt_out_mixpanel? %>
<% if CurrentUser.is_member? && !CurrentUser.opt_out_tracking? %>
window._paq.push(["setUserId", '<%= CurrentUser.id %>']);
<% end %>
window._paq.push(["setDomains", "*.donmai.us"]);
<% if !CurrentUser.opt_out_mixpanel? %>
<% if !CurrentUser.opt_out_tracking? %>
window._paq.push(["setCustomVariable", 1, "level", <%= CurrentUser.level %>, "visit"]);
window._paq.push(["setCustomVariable", 2, "age", <%= ((Time.now - CurrentUser.created_at) / 1.year).to_i %>, "visit"]);
window._paq.push(["setCustomVariable", 3, "postUpdateCount", <%= CurrentUser.post_update_count.to_i / 100 %>, "visit"]);