add mixpanel tracking for clicking stripe buttons
This commit is contained in:
@@ -8,3 +8,13 @@
|
|||||||
<%= stripe_button("Upgrade Gold to Platinum", 2000, user) %>
|
<%= stripe_button("Upgrade Gold to Platinum", 2000, user) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% content_for(:html_header) do %>
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
if (typeof window.mixpanel === 'object') {
|
||||||
|
window.mixpanel.track_forms(".stripe", "Clicked Account Upgrade");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<% end %>
|
||||||
|
|||||||
@@ -124,7 +124,7 @@
|
|||||||
<% content_for(:html_header) do %>
|
<% content_for(:html_header) do %>
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
window.Danbooru.mixpanelEvent("Account Upgrade");
|
window.Danbooru.mixpanelEvent("View Account Upgrade");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user