add mixpanel tracking for clicking stripe buttons

This commit is contained in:
Albert Yi
2018-11-02 17:03:24 -07:00
parent 5d83864131
commit 4219163042
2 changed files with 11 additions and 1 deletions

View File

@@ -8,3 +8,13 @@
<%= stripe_button("Upgrade Gold to Platinum", 2000, user) %>
<% end %>
</div>
<% content_for(:html_header) do %>
<script>
$(function() {
if (typeof window.mixpanel === 'object') {
window.mixpanel.track_forms(".stripe", "Clicked Account Upgrade");
}
});
</script>
<% end %>

View File

@@ -124,7 +124,7 @@
<% content_for(:html_header) do %>
<script>
$(function() {
window.Danbooru.mixpanelEvent("Account Upgrade");
window.Danbooru.mixpanelEvent("View Account Upgrade");
});
</script>
<% end %>