Commit 03704473
Changed files (2)
app
views
creations
layouts
app/views/creations/show.html.erb
@@ -40,7 +40,7 @@ $(function() {
<div class="span3">
<% if user_signed_in? %>
<% unless current_user == @creation.user || current_user.already_likes(@creation) %>
- <%= button_to "ADD TO FAVORITES", creation_favorites_path(:creation_id => @creation.id), :method => :post, :class => 'btn btn-primary mix-link', "data-event" => 'click-add-to-favorites' %>
+ <%= button_to "ADD TO FAVORITES", creation_favorites_path(:creation_id => @creation.id), :method => :post, :class => 'btn btn-primary', "data-event" => 'click-add-to-favorites' %>
<% end %>
<% else %>
<p><%= link_to "SIGN UP FOR FREE", new_user_session_path, :class => "btn btn-primary mix-link", "data-event" => 'click-sign-up' %></p>
app/views/layouts/_mixpanel.html.erb
@@ -10,6 +10,7 @@ mixpanel.disable();
mixpanel.identify(<%= current_user.id %>);
mixpanel.name_tag("<%= current_user.email %>");
mixpanel.people.set({"$email":"<%= current_user.email %>","$created":"<%= current_user.created_at %>","$last_login":"<%= current_user.last_sign_in_at %>","city":"<%= current_user.city %>","latitude":"<%= current_user.latitude %>","longitude":"<%= current_user.longitude %>","website":"<%= current_user.website %>","twitter":"<%= current_user.twitter %>","facebook":"<%= current_user.facebook %>","profile":"<%= "#{request.protocol}#{request.host_with_port}#{url_for(profile_path(current_user))}" %>"});
-//mixpanel.track_links(".mix-link", "clicked-link", function(ele) { return { type: $(ele).attr('data-event')}});
+mixpanel.track_links(".mix-link", "clicked-link", function(ele) { return { type: $(ele).attr('data-event') }; });
+mixpanel.track_forms('.button_to', "form-submitted", function(form) { return { type: $(form).attr('action') }; });
</script>
-<% end %>
+<% end %>
\ No newline at end of file