What This Article Covers
This article explains how to build links in Keap email sequences that automatically include contact record data — such as name and email address — in the URL. This technique is used to pre-fill external (non-Keap) forms when a contact clicks the link. The destination web page must already be configured to read values from a URL query string and use them to populate form fields. If your external page is not yet set up to do this, contact the developer who manages that page before proceeding.
How URL Query Strings Work
A URL query string is the portion of a URL that carries data as key-value pairs. Query strings are appended to the end of a URL with a question mark (?), and each additional parameter is separated by an ampersand (&). Here is an example of a URL with a query string:
https://siteurl.com/page-name/?first_name=Mickey&last_name=Mouse&email=mickeymouse@email.com
In this example, the query string begins after the ?. The first parameter is first_name and its value is Mickey. The second parameter is last_name with a value of Mouse, and so on. When the destination page receives this URL, it can read each parameter value and use it to populate the corresponding field in the form.
To make this dynamic — so that each contact's own data is passed in the URL when they click the link — you replace the static values with merge fields from the Keap contact record. A merge field is a placeholder that Keap replaces with the contact's actual data when the email is sent. For example, the finished URL with merge fields looks like this:
https://siteurl.com/page-name/?first_name=~Contact.FirstName~&last_name=~Contact.LastName~&email=~Contact.Email~
When a contact clicks this link in their email, Keap substitutes each merge field with that contact's actual first name, last name, and email address before the URL is sent to the browser.
How to Build a Pre-Fill Link in a Keap Email Sequence
- Open an email in an automation sequence in the Automation Builder.
Click inside a text area in the email editor and click the merge field button in the email toolbar to open the merge field picker.
The merge field button is located in the email editor toolbar. Clicking it opens the merge field picker where you can select fields from the contact record.
Insert each merge field you want to include in the URL — for example, first name, last name, and email address. Each merge field will appear as a token in the text area, such as
~Contact.FirstName~.Copy the merge field tokens from the text area and paste them into a text editor such as Notepad to assemble the full URL. Build the URL by placing your destination page URL first, followed by a
?, and then adding each parameter asparameter_name=~MergeField~with&between each one. The completed URL should follow this structure:https://siteurl.com/page-name/?first_name=~Contact.FirstName~&last_name=~Contact.LastName~&email=~Contact.Email~The parameter names (such as
first_name) must match exactly what the destination web page expects to receive. Check with the developer of the external form if you are not sure what parameter names the page uses.Return to the email editor and type the link text you want the contact to click — for example, Fill out your details — in the location in the email where you want the link to appear.
Highlight the link text you just typed and click the link icon in the email toolbar to open the link insertion dialog.
The link icon is located in the email editor toolbar. Clicking it with text highlighted opens the link URL field where you paste the destination URL.
Paste the full URL you assembled in step 4 — including all merge field tokens and query string parameters — into the URL field and click Insert Link.
The link insertion dialog displays the URL field. After pasting the full URL with merge field tokens and clicking Insert Link, the highlighted text becomes a hyperlink. When the email is sent and a contact clicks the link, Keap replaces each merge field token with that contact's actual data before the URL is passed to the browser.
Comments
0 comments