What is it good for?
This solution allows to automatically create landing page links that contain a unique user ID. Use of such links allows you to track the landing page referral process by those who filled out the form.

Use
First, add the following code to the "javascript codes" tab, to the main page:

function generateId () {
  return Math.floor(Math.random() * 10000000000);
}
document.querySelector('.widget-input-button').onclick = function () {
  document.querySelector('[name=user_id]').value = generateId();
};

Next, add the below code to the conversion page:

document.querySelector('.reflink-area').innerHTML = 'your_address_here.com?user_id=' + conversion.user_id;

Please replace the words 'your_address_here.com' with the URL of a landing page, where you add the above code, e.g. 'mylanding.com'.

Then go to the editor and create a form on a landing page. The form must contain one hidden field. This field must have a value of 'Name attribute' set to 'user_id.'

Then proceed to the editing of the conversion page. Create a widget (such as a text field) on it and give it the 'reflink-area' class. Reflink will appear in this area.

Now it is time to publish the landing page. From this point on, each time after the form has been correctly filled and submitted, a 10 digit user code will be generated, which will be stored in the hidden user_id field and will also be stored in the lead. The same code will also be added to the link that will appear on the conversion page. This link should be used by the subscriber to further recommend the landing page.

Did this answer your question?