DEAL ENDS IN:

SPRING SALE!

UP TO 35% OFF!

GET IT NOW

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

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

If you want to display the output of the query-string DKI shortcode when users browse other pages on your site, add the parameter persist=”yes” to the DKI shortcode. Learn more.

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|). Learn More.
  • ActiveCampaign’s merge tags: %TAG% (e.g. %FIRSTNAME%). Learn more.
  • Drip’s merge tags: {{ tag }} (e.g. {{ firstname }}.
  • ConvertKit’s merge tags: {{ tag }} (e.g. {{ subscriber.first_name }}). Learn More.
  • HubSpot’s merge tags: {$tag} (e.g. {$FirstName}). Learn More.
  • 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

Geolocation DKI

Use these simple Geolocation DKI shortcodes to insert the user’s location: country, city, state, continent, or time zone.

Example:

People in United States love If-So!

The country name in the above example is automatically displayed using the Country DKI Shortcode. Your location is detected using our IP-to-location service.

The Geolocation DKI shortcodes

Insert the user’s country

[ifsoDKI type='geo' show='country' fallback='']

*Add ajax=’yes’ if you are using page caching

Insert the user’s state

[ifsoDKI type='geo' show='state' fallback='']

*Add ajax=’yes’ if you are using page caching

Insert the user’s city

[ifsoDKI type='geo' show='city' fallback='']

*Add ajax=’yes’ if you are using page caching

Insert the user’s continent

[ifsoDKI type='geo' show='continent' fallback='']

*Add ajax=’yes’ if you are using page caching

Insert the user’s timezone

[ifsoDKI type='geo' show='timezone' fallback=''] 

*Add ajax=’yes’ if you are using page caching

Insert the user’s country flag

The country flag DKI shortcode requires the If-So Geolocation Extension to work.

[ifsoDKI type='geo' show='flag' width='50px' classname='class-you-choose'] 

*Add ajax=’yes’ if you are using page cache. The ‘classname’ parameter is optional. You can include it if you want to assign a CSS class to the flag element.

** Please note that IP-to-location services are not 100% accurate. The accuracy changes between different countries, ISPs, devices, and other factors. Learn more.

DKI shortcodes and page caching

If you are using cache on your site then, in practice, users are being served with a “snapshot ” of the page. For the DKI shortcodes to work in such cases, we offer an option to load dynamic content using a separate Ajax request after the page loads from the cache.

To load the DKI shortcode using Ajax, add the parameter ajax=”yes” to the DKI shortcode. For example:

[ifsoDKI type='geo' show='country' ajax='yes' fallback='']

Set a fallback for the Geolocation DKI shortcode

By default, the Geolocation DKI shortcode will not display anything if a value is not returned (usually if you run out of sessions or in rare cases in which the user’s IP is not recognized). To display a fallback value, simply add the parameter fallback=”something” to the shortcode. For example:

[ifsoDKI type='geo' show='country' fallback='something']

FAQs

  • Can the Geolocation DKI Shortcode display location names in languages other than English?

    The DKI shortcode retrieves values directly from our IP-to-location database and is limited to displaying location names in English. However, our CSV extension offers a solution:

    1. Ensure the CSV extension is installed on your site.
    2. Download our “All-countries” CSV file (click to download).
    3. Insert the desired language’s location names in column D.
    4. On your WP dashboard, create a new bulk with a geolocation condition and upload the file.
    5. Paste the CSV shortcode, displaying values from column D, wherever you want to show the country name on your page.

  • Was this Helpful ?
  • YesNo

Dynamic Keyword Insertion

Insert keywords into your web pages using simple shortcodes.

With If-So DKI you can display:

  • The user’s location: country, state, city, or continent
  • A value of a query string parameter
  • The user name
  • An event time – calculated according to the user time zone

And more…

The Available DKI Shortcodes

Geolocation DKI

Display the user’s location: country, city, state, continent, or time zone.

[ifsoDKI type='geo' show='country']

The shortcode above inserts the user’s country, other information can be displayed by replacing the value of the “show” parameter.

More Options >

Google Ads DKI

Insert the keyword that was used to trigger your ad.

[ifsoDKI type="google-ads" parameter="YOUR-PARAMETER" fallback="Your default value (optional)"]

Learn more >

Query String DKI

Display the value of any query string.

[ifsoDKI type="querystring" parameter="YOUR-PARAMETER" fallback="Your default value (optional)"]

The shortcode above will display the value of the parameter “YOUR-PARAMETER”. I.e. if the page URL is example.com?YOUR_PARAMETER=Awesome, the word Awesome will be displayed.

Learn more >

Auto-Local Time Display

Show an event time that is calculated according to the user’s time zone.

[ifsoDKI type='time' show='user-geo-timezone-sensitive' time='04/25/2022 08:00' format='n/j/o, G:i']

Learn more >

User Details (for logged-in users)

Display the user’s first name, last name, email, and more.

[ifso_user_details show="firstName" fallback="Default value (optional)"]

More User Details DKI options >

Display a login/logout link.

[ifso_login_link login_redirect="https://example.com/account" ]

The shortcode above will display a login/logout link, the user will be redirected to a page you choose after logging in.

Learn more about the Log In/Out shortcode >

Referral Source DKI

Display the URL of the referral website or webpage.

[ifsoDKI type='referrer' fallback="Default value (optional)"]

What is your referral?

Browser Language DKI

Display the user’s browser language.

[ifsoDKI type='language' show='primary-only']

More Browser Language DKI options >

Total Number of Pages Visited by the User

Display the number of website pages that were visited by the user.

[ifsoDKI type='viewcount' show='visit-count']

Post ID

Display any page, post, or custom post using a simple shortcode.

[ifso-show-post id="123"]

Learn more >

Extensions and Integrations with DKI Shortcodes

WooCommerce DKI Shortcodes

Display the number of items in the cart, value in the cart, and more.

Learn more >