This guide will enable you to encrypt the custom fields being passed via the Results node Exit URL going to your External thank you page.

Take note, Leadshook will encrypt it on our side before sending, but you will need to decrypt it on your page builder. So you need to make sure if your Page builder is capable of using Javascripts upon receiving the URL payload.

  1. Add the Encryption script below on the node before your results node which has the redirect.
    Make sure to set it to “ENTER”
var fname = '{first_name}';   
var lname = '{first_name}';
var enc = window.btoa(fname); 
var enc2 = window.btoa(lname);     
DT.setField('first_name', enc); 
DT.setField('last_name', enc2); 

With this code example, it basically encrypts them one by one so you can use them on your Exit URL. You can also add and encrypt as many custom fields to the URL.

2. Edit your Results page “Exit URL” to something like this.


Where you need to add the custom fields that you want to pass at the end just like how you would set it up as a normal Exit Redirect passing URL parameters.

This will basically redirect to your landing page domain + the URL parameters that you encrypted previously.

3. Save and republish and this should redirect with an encrypted custom field via the URL params.

4. Last step is to decrypt it within your Landing page. You can use the script below.

var fname = '{first_name}';   
var lname = '{last_name}';   
var dec = window.atob(fname);   
var dec2 = window.atob(lname);   
DT.setField('first_name', dec);   
DT.setField('last_name', dec2); 

So what’s happening here is that your landing page is decrypting the custom field being passed from Leadshook. It should then print out the values.

In case if you want to pass and Encrypt the whole Exit URL, then you will need to use this Encryption Script.

var URL = '{field1}&field2={field2}';   
var enc = window.btoa(URL);   
DT.setField('URL', enc); 

Leave a Reply

Your email address will not be published. Required fields are marked *