Commit e56730b3

mo khan <mo@mokhan.ca>
2014-08-23 17:27:07
remove mixpanel.
1 parent 65f8570
Changed files (6)
app/views/creations/show.html.erb
@@ -10,7 +10,7 @@
     <% if @creation.tags.any? %>
       <span> <i class="icon-tags"></i> </span>
       <% @creation.tags.each do |tag| -%>
-        <%= link_to creation_tag_path(tag.name), class: 'mix-link', data: { event: "click-on-tag" } do %>
+        <%= link_to creation_tag_path(tag.name) do %>
           <span class="label"><%= tag.name %></span>
         <% end %>
       <% end -%>
@@ -23,7 +23,7 @@
             <%= 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", login_path, :class => "btn btn-primary mix-link", "data-event" => 'click-sign-up' %></p>
+        <p><%= link_to "SIGN UP FOR FREE", login_path, :class => "btn btn-primary" %></p>
       <% end %>
       </div>
       <div class="span3">
app/views/devise/registrations/new.html.erb
@@ -9,8 +9,6 @@
         $('#submit-registration').attr('disabled', 'disabled');
       }
     });
-    mixpanel.track_forms(".form-inline", "signed in");
-    mixpanel.track_forms(".form-horizontal", "registered");
   });
 </script>
     <% end %>
app/views/layouts/_mixpanel.html.erb
@@ -1,16 +0,0 @@
-<!-- start Mixpanel --><script type="text/javascript">(function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"===e.location.protocol?"https:":"http:")+'//cdn.mxpnl.com/libs/mixpanel-2.2.min.js';f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f);b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==
-typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.set_once people.increment people.append people.track_charge people.clear_charges people.delete_user".split(" ");for(g=0;g<i.length;g++)f(c,i[g]);
-b._i.push([a,e,d])};b.__SV=1.2}})(document,window.mixpanel||[]);
-mixpanel.init("<%= ENV['MIXPANEL_API_KEY'] %>");</script><!-- end Mixpanel -->
-<% if current_user %>
-<script type="text/javascript" charset="utf-8">
-<% if Rails.env.development? || Rails.env.test? %>
-mixpanel.disable();
-<% end %>
-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_forms('.button_to', "form-submitted", function(form) { return { type: $(form).attr('action') }; });
-</script>
-<% end %>
\ No newline at end of file
app/views/layouts/application.html.erb
@@ -29,7 +29,6 @@
 <!--[if lt IE 9]>
   <script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script>
 <![endif]-->
-<%= render "layouts/mixpanel"%>
 <%= render "layouts/embedly"%>
 <%= yield :javascript %>
 <%= render "layouts/uservoice_feedback"%>
app/views/my/avatars/edit.html.erb
@@ -1,9 +1,3 @@
-<% content_for :javascript do %>
-<script type="text/javascript">
-try { mixpanel.track_forms(".edit_avatar", "uploaded avatar"); } catch {}
-</script>
-<% end %>
-
 <%= render :partial => "shared/account_nav", :locals => { :selected => :picture } %>
 <div class="row">
   <div class="span12">
app/views/shared/_creation_image_gallery.html.erb
@@ -2,10 +2,10 @@
   <% @creations.each do |creation| %>
     <li class="span3">
     <div class="thumbnail">
-      <%= link_to creation, class: 'mix-link', data: { event: 'click-on-thumbnail' } do %>
+      <%= link_to creation do %>
         <img src="<%= creation.primary_image.url_for(:thumb) %>" alt="<%= creation.name %>" style="width:260px;height:180px;" />
       <% end %>
-      <h3><%= link_to short_name(creation, 15), creation, class: 'mix-link', data: { event: 'click-on-title' } %></h3>
+      <h3><%= link_to short_name(creation, 15), creation %></h3>
       <h4><small>By <%= link_to shrink(creation.user.name, 20), profile_path(creation.user) %></small></h4>
       <p>
       <%= link_to creation_favorites_path(:creation_id => creation.id) do %>