Adding unique identifier to lead


Is there a way to add a Unique lead ID number to the lead form, perhaps as a hidden field?  Currently my client has no formal CRM software and prefers to receive the leads via email, but would like each lead that comes in to have a unique reference number.  I don’t see any standard way to do that. Any ideas?


10 replies

Userlevel 7
Badge +3

Hi Michael, 

A few months back there was a similar thread here in the community and I wrote a little piece of code that would add a random number to a hidden field in your form. 

You can take a look here and use it as a base to work off. 

This method assigns a random number between 10,000 and 100,000 and the numbers are not sequential. 

Best,
Hristian

Thanks, Hristian.  I am looking to use sequential numbers rather than random and I am not a JS expert, but I’ll review and see if I can use the basic structure to generate a sequential number.

Hi Michael. Did you ever find out how to generate sequential numbers? I was just searching for exactly that and found your post. Thanks for any help you might be able to give!

Userlevel 7
Badge +3

Hi Matt, 

The problem with sequential numbers is that you need some kind of database to keep track of the leads and the order they come in. Then you need to ping the DB each time there is a form submit event and get the next number.

After Michael’s question last month, I did a bit of research and it can be done in theory but it’s a lot of development for something like this. 

Have you looked into using a CRM to handle this?

Best,
Hristian

Hi Hristian,

Ah no worries. I contacted a few developers and had a similar response.

Well, goes without saying that this would be a really handy feature to have.

Our clients need some way of keeping track of leads which are being passed to a third party before then making it onto their CRM after being contacted, so this would be very useful.

Thanks

Userlevel 7
Badge +3

Hey guys, 

I got a bit carried away yesterday and wanted to get this to work. Fortunately, after about 10h of work, I was able to do it. 

My self-imposed restrictions were that it needs to be a front end solution that uses a free service as a database so it doesn’t cost anything per month to maintain.

Of course, as any front end solution, anyone with enough technical abilities can see where the calls are going and could, in theory, send his own calls.
However, the database won’t contain the actual lead’s info so not much damage can be done, other than a bit of annoyance. 

The 2nd limitation is that the free DB service supports up to 100 simultaneous form submits. If you have more than 100 people submitting your form at the same time, the DB would cost you a bit of money per month. 

Anyway, now I’m able to put sequential numbers/ids into a hidden field of the form. 

If anyone is interested, they can ping me at: h+support@revise.cc for a quote. 

Best,
Hristian

Hello - Is the code to generate the random number still available somewhere? The link in the post is missing. Thank you

Userlevel 7
Badge +1

Hey Kyle!

 

Thanks for pointing that out! Some things got mixed up when we changed Community platforms. I’ve updated the link in that post, but for ease of access, it’s here 👇


Math.random integration 

 


Hi Garrett, 
First, welcome to the Unbounce community. 
I just played around a bit with the math.random function and managed to get it working. 
(Please keep in mind this hasn’t been thoroughly tested so do your due diligence and test across browsers/devices)
&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; var randomNum = '';<br />&nbsp; &nbsp; &nbsp; randomNum += Math.round(Math.random() * (100000 - 10000) + 10000);<br />&nbsp; &nbsp; &nbsp; var elem = document.getElementById("random_number…

 

 

 

Cheers

 

 

Thank you. Do you know if there is a way to pass the Unique ID in the URL of the Thank you page after they submit the form? We don’t want to append all the form data… just the unique ID - Thank you

Has anyone been able to figure out how to append a unique ID to the URL?

Reply