Using email in the URL to identify users

It appears from AC site tracking documentation here that in order to identify leads using method #3, the Javascript needs to contain an email using the string of code referenced in this snippet:

"To do this, you will need to add the following line to the tracking code:

vgo(‘setEmail’, ‘Email_Address_Goes_Here’);
above this line:

vgo(‘process’);"

Our forms solution is able to put the leads email address (after filling out the form) into the URL that looks something like this.

My hope is that I could add some additional javascript that will clean that URL, take the email address, and place it into the code. So in the script, it would look something like this:

vgo(‘setEmail’, window.location.href.split(“Q5=”)[1]);

I’m really not experienced with Javascript but I did run this by a friend who is that seems to think it would be feasible. What do you all think?

Am I creating any kind of security risk doing this?

Thanks!

1 Like

Hey Zac! Sorry we missed this when it was originally published, but in the spirit of providing insight on this question, I’ll be happy to take a look!

When it comes to that third option of the site tracking options, it is very important to highlight that although our team does not offer codding support, we do recommend using the suggested string the way that it is shown in our article. That said, if you are interested in hiring a tech expert to go over this type of concern, feel free to take a look at our Certified Consultants page.

Keep us posted if anything else comes up along the way!