How to Integrate Ruler Analytics tracking with your Unbounce Landing pages

When using a landing page builder such as Unbounce, Ruler may not be able to automatically detect your form submissions, you will need to add some further script to your landing pages to allow Ruelr to track your leads.

Please follow the steps laid out below.

Log in to your Unbounce account.

  1. Go to the 'Edit' section of your campaign

  2. Click on ‘Javascripts’ - Add New Javascripts

  3. Add your Ruler Analytics Tracking Javascript to the footer of the website.
    You can find this in your Ruler Analytics dashboard under site setup.

Once the main Javascript is in place you can then go on to add the extra code needed to track your Form submissions from Unbounce.

  1. Go to Javascripts. Add the script provided below.
window.ub.hooks.afterFormSubmit.push(function (args, callback) {
  try {
    var payload = {
      email: args.formElement.querySelector("#InputIDHERE").value,
      name: args.formElement.querySelector("#InputIDHERE").value,
    RulerAnalytics.trackConversion(payload, "convert", callback, 1000);
  } catch (e) {

Please watch for any formatting errors when pasting directly.

How to populate the script correctly.

Each form field will have an input id. You can find this by again inspecting the element of the field. It will look something like this;


The id= needs to go into the corresponding field name. So for this example it would look like this

email: args.formElement.querySelector("#full_name").value

Please ensure the variable ids are identical to what is in place on the form and take note that it is case sensitive.



If you require any assistance or have any questions please contact our Support Team