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

@@ -38,11 +38,11 @@
<%= render "secondary_links" %>
<%= content_for(:page_title) do %>
<% content_for(:page_title) do %>
Forum - <%= @forum_topic.title %> - <%= Danbooru.config.app_name %>
<% end %>
<%= content_for(:html_header) do %>
<% content_for(:html_header) do %>
<%= auto_discovery_link_tag(:atom, {format: :atom}, {title: @forum_topic.title}) %>
<script>

View File

@@ -69,7 +69,7 @@
<% end %>
<% end %>
<%= content_for(:html_header) do %>
<% content_for(:html_header) do %>
<%= tag.link href: posts_path(format: "atom", tags: params[:tags]), rel: "alternate", title: "ATOM", type: "application/atom+xml" %>
<%= tag.link rel: "prefetch", href: next_page_url, as: "html", crossorigin: "use-credentials" %>
<%= tag.link rel: "next", href: next_page_url %>

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() {