add mixpanel events for signup page

This commit is contained in:
Albert Yi
2018-10-22 17:05:05 -07:00
parent b999fc86ea
commit 08e3051d31
4 changed files with 18 additions and 5 deletions

View File

@@ -1,4 +1,17 @@
<div class="ui-corner-all ui-state-highlight" id="sign-up-notice">
<h1>Like the site? <%= link_to "Sign up for a free basic account!", new_user_path %></h1>
<h1>Like the site? <%= link_to "Sign up for a free basic account!", new_user_path, id: "sign-up-link" %></h1>
<p><%= link_to "No thanks", "#", :id => "hide-sign-up-notice" %></p>
</div>
<% content_for(:html_header) do %>
<script>
$(function() {
$("#sign-up-link").click(function() {
window.Danbooru.mixpanelEvent("clicked sign up");
});
$("#hide-sign-up-notice").click(function() {
window.Danbooru.mixpanelEvent("hide sign up notice");
});
})
</script>
<% end %>

View File

@@ -3,7 +3,7 @@
<p><%= link_to "No thanks", "#", :id => "hide-upgrade-account-notice" %></p>
</div>
<%= content_for(:html_header) do %>
<% content_for(:html_header) do %>
<script>
$(function() {
$("#goto-upgrade-account").click(function() {