How to Insert a Contact’s Name From your CRM/ESP into your Site?

In this post we will show you how to pull a contact's data from your ESP or CRM and display it on your site using a simple shortcode.

Using data from your Customer Relationship Management (CRM) or Email Service Provider (ESP)  is a great way to personalize a user’s experience on your site. The user’s name or any other data can be automatically included as a query parameter in the URL, and be displayed on your website using a simple shortcode.

Live Example: Click here to See how we display the name “Bob” on our website’s main banner.

What kind of information can I use?

CRMs and ESPs can store lots of information about your users, such as name, email, location, and even preferences they may have filled out on a form on your site. All this data can be added to links created by these systems as a value of a query parameter. In most CRM’s and ESP’s, these parameters are usually called “Merge Tags”. 

Merge Tags

CRMs and ESPs use “merge tags” to correspond with fields and information from your database. These “merge tags” are the format for the query string parameter. 

For example, if you are using the “User Name” merge tag, the user’s name will automatically be added to the links from your email campaign to your website (i.e example.com?firstname=Bob).

How to display a name (or any other data) on your site using a shortcode

Once you have the user name, or any other value, as a parameter in the URL, you can use our query string DKI shortcode to automatically display that parameter value on your page. 

The shortcode will display the value of any parameter of your choice. Simply, paste the following shortcode on your site and replace the parameter name with your own parameter name.

[ifsoDKI type="querystring" parameter="YOUR-PARAMETER" fallback="Default value - optional"]

For example, the shortcode below will display the value of the parameter example

[ifsoDKI type="querystring" parameter="example"]

Setting up a fallback

By default, the query string DKI shortcode will not display anything if the parameter doesn’t exist in the URL. If you want to set a different value, simply add the parameter fallback=”your value” to the shortcode, and set its value.

[ifsoDKI type="querystring" parameter="YOUR-PARAMETER" fallback="your value - optional"]

Displaying values of more than one query parameter

You can use the Query string DKI shortcode numerous times on the same page. All you have to do is to add a shortcode for each one of the parameters.

Passing multiple parameters in the URL is done by separating each parameter with an & sign.

i.e. example.com?param1=value1&param2=value&param3=value3

Tags used by common CRMs and ESPs

For your convenience, here is a list of tags used by common CRMs and ESPs:

  • MailChimp’s merge tags: |TAG| (e.g. |FIRSTNAME|)
  • ActiveCampaign’s merge tags: %TAG% (e.g. %FIRSTNAME%)
  • Drip’s merge tags: {{ tag }} (e.g. {{ firstname }}
  • ConvertKit’s merge tags: {{ tag }} (e.g. {{ subscriber.first_name }})
  • HubSpot’s merge tags: {$tag} (e.g. {$FirstName})
  • Salesforce’s merge tags: {!ObjectName.FieldName} (e.g. {!Contact.FirstName})
  • AWeber’s merge tags: {!tag} (e.g. {!firstname})
  • Bronto’s merge tags: %%tag%% (e.g. %%firstname%%)

Reserved WordPress Terms (parameters)

WordPress reserves some parameters for its own use. Adding these parameters to the URL may result in a 404 error without any other hint or explanation. 

Click here for the full list of reserved term

Related Articles