Skip to content

Instantly share code, notes, and snippets.

@aTei
Created March 15, 2017 07:54
Show Gist options
  • Select an option

  • Save aTei/3372775787cbbd24cc00a9d21058018a to your computer and use it in GitHub Desktop.

Select an option

Save aTei/3372775787cbbd24cc00a9d21058018a to your computer and use it in GitHub Desktop.
Devise 4: track Sign Ups inside views (for example, in Google Analytics)
<script>
...
init google analytics
...
<% if defined?(notice) && (notice == t('devise.registrations.signed_up')) %>
// send GA event or pageview about Sucessful sign up here, example
ga('send', 'pageview', '/users/sign_up/success');
<% end %>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment