Skip to main content

How to install?

Before installing the snippet, ensure that you have already added the tracking script to your page. The gr function is only available if you already installed the Tracking Script.

Video

React JS

In a React application, you’ll need to call the Reditus conversion event in the callback of your sign-up success handler.

Javascript

For standard JavaScript, simply include the snippet in your success handler when the user signs up:

Ruby On Rails

If you’re using Ruby on Rails, you’ll need to mark new referrals when a user successfully signs up. Add the following code to your application to track user registrations using the Devise gem.
  1. Controller: In your app/controllers/users/registrations_controller.rb, you’ll track successful user sign-ups like this:
Here, we store the email of the newly created user in session[:reditus_referral].
  1. View: In your app/views/layouts/application.html.erb, add the following code to call the tracking method after the registration is complete: