MixPanel Javascript on Rails app sends to route '/undefined' -


i'm trying use mixpanel's javascript web track our new user signup flow.

simply put, when user clicks 'signup' button--or mixpanel js referring to--the app directed '/undefined'. action tracked in mixpanel, of course, app broken , user isn't created because of this.

this example of mix panel code looks (in script tag on bottom of embedded ruby html file):

  // mixpanel - user signup button   mixpanel.track_links("input .signup-btn", "create user account", {     "referrer": document.referrer   }); 

i don't 'document.referrer' does, followed mixpanel's docs.

this function on view , form in render partial on view. though can't imagine being issue because js comes @ bottom of page.

i'm not using mixpanel's gem. rails app consumes our api. there no models or users gem overkill in situation. need track each step of signup process solely front-end perspective.

it's this:

  $("#first-name").click(function(){     mixpanel.track("first name input clicked");   }) 

because tack_links expecting go page.

this track click.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -