Live Personalization Examples

Watch If-So in action! 6 live personalization examples including a step-by-step guide and screenshots to help you do the same on your site.

#1 Displaying the user’s location

Display the user’s location using a simple shortcode.

Conditions/features in use: Geolocation DKI shortcode

People in love If-So!

The country name is displayed using the following Country DKI shortcode.

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

Other shortcode options allow presenting the user’s continent, state, city, or time zone. More about the Geolocation DKI Shortcodes.

How we did it

It couldn’t be simpler; we just pasted the Country DKI shortcode into the sentence.

The shortcode inherits the style from the wrapping element.

#2 Location-based content and dynamic content from CSV

Show content (any content) based on the user’s location. Use a standard If-So trigger with the geolocation condition or use the CSV extension if you have many different versions.

Conditions/features in use: The Geolocation Condition & The CSV Extension

We created a CSV file with a list of all 249 countries, their names, and flags (the file is available for you to download and use on your site). We used our CSV extension to upload the file and display the column’s content (the column with the flags).

How we did it:

Since we wanted to create 249 different versions of content (one version per country), we chose to use our CSV extension instead of creating a standard if-then dynamic trigger. The CSV extension was built to add and manage thousands of different versions with ease and with minimal effect on the loading speed.

1) We created a new “If-So Bulk”, and uploaded the pre-made countries’ flags CSV file that you can download from our site. After uploading the file, it is editable directly from the site.

This is how it looks:

The CSV file, after being uploaded to the site

2) We pasted the shortcode that displays the content of column C on the page:

#3 Displaying the value of a query parameter

Display a value of any query parameter using a simple shortcode.

Conditions/features in use: The query-string DKI shortcode

👑 {YOUR NAME} is awesome!👑

Fill in your name to see it in action

The query string DKI shortcode displays the value of any parameter in the URL. You can set fallback content displayed when the parameter doesn’t exist in the URL.

[ifsoDKI type="querystring" parameter="example" fallback="{YOUR NAME}"]

Popular use cases:
– Include the name of visitors arriving from your email campaigns.
– Display the word that was used to trigger your Google Ads ad.

More about the query string DKI

How we did it:

We used the query string DKI shortcode below to display the parameter “example” value.

[ifsoDKI type="querystring" parameter="example" fallback="{YOUR NAME}"]

Here is how it looks on the editing side:

#4 Segment users & allow users to select their intrest

Segment users into audiences and show content accordingly. Segmentation can be done based on the user interaction with the site or based on the user selection, as in the following example.

Conditions/features in use: Audiences & User Self-selection Form Extension:

What is your favorite page builder?

Assign users into audiences when an If-So condition is met or when they visit a certain page. You can then show audience-based content when the user browses different pages on your site.

Alternatively, use the audience Self-selction Form Extension to allow users to assign themselves to an audience.

How we did it:

Step 2: We used the Audience Self-selction Form extension to generate a shortcode that creates the selection form.


Step 3: We created a trigger with correspondence versions and Audience conditions to show content to users who are a part of each audience.

Step 1: Creating the audiences
On the WordPress dashboard, under If-So > Audiences, we clicked “add a new audience” and created three audiences: “Gutenberg”, “Elementor”, and “Other”.

Create audiences

Step 2: Creating the self-selection form
Still on the audiences page (If-So > Audience on your dashboard), we used the self-selection form generator to generate the shortcode that will show the form and paste the shortcode on the page.

* To enable the self-selection form, you need to install the Audience Self-selection Form Extension

The shortcode used to create the form on this page is:

[ifso_group_selection type="select" options="Gutenberg,Elementor,Other" default-option="Select" ajax="no" ]

Other options included in the form generator are:

  • Selecting the form type – selection form (as in our example), or radio buttons.
  • Reloading the page after the user selection or assigning users to an audience in the background using Ajax (this option is useful if you want to use several selection fields on the same page).
  • Redirection – choose where to redirect users after form submission.
  • And more…

Step 3: Creating a trigger with the audience condition
We created a dynamic trigger with four different versions. One version for each audience, and one version as the default content displayed if the visitor hasn’t selected a preference.

#5 Conditional pop-ups with a sequence of content

Display a pop-up based on a condition on the user’s first visit. Display another pop on the next visit – only to users who saw the first pop-up.

Conditions/features in use: The Page URL Condition & Conditional Pop-ups & The Cookie Condition

Click “GO” to see the demo

Any If-So trigger can be displayed as a pop-up by adding a simple parameter to its shortcode. In this example, we used the Page URL condition (IF: URL > Contains > ?tip=yes) to trigger the first pop-up and to add a cookie to the user’s browser while that happens.

When the page loads for the 2nd time, we use the cookie condition to show the 2nd pop-up if the cookie exists in the user’s browser and remove the cookie so that the pop-up will not be displayed again.

How we did it:
We created a trigger with the content of the pop-ups as the dynamic versions and set the trigger’s content to be displayed as a pop-up.

Displaying the trigger’s content as a pop-up

To make the trigger’s content appear as a pop-up, we installed the Trigger Events Extension and added two parameters to the triggers’ shortcode: ajax=”yes” and display=”modal”.

Here’s how the shortcode looks on our page:

[ifso id="401123" ajax="yes" display="modal" closebtn='#IfsoModalClose']

As you can see in the shortcode, we also included the parameter closebtn=’#IfsoModalClose’. Adding the parameter overrides the default pop-up closing functionality of closing by clicking the background or the small “X” that appears at the top right corner. Instead, closing the model is done by clicking an element with the ID set as the parameter value.

The trigger

Pop-up #1

Pop-up #1 is displayed based on the page URL condition (If: Page URL > Contains > ?tips=yes Then: Show the dynamic version of pop-up #1).

In addition to the content of the pop-up, we included an If-So shortcode that adds a cookie with the name “tips” and the value “2”:

[ifso-add-cookie name='tips' value='2' time='3600']

The shortcode allows you to assign a cookie with any name and value of your choice.

Here’s a screenshot of how it looks on our side:

Pop-up #2

Pop-up #2 is displayed based on the cookie assigned when pop-up #1 was displayed (If: Cookie > Name is “tips” and value is “2” Then: Show tip #2).

Since If-So checks the conditions based on their order in the trigger, from top to bottom, we dragged the version of pop-up #2 to be above the version of pop-up #1. In other words, if the cookie “tips”, cookie value “2” exists in the user’s browser, pop-up #2 is displayed; if not, then If-So checks the next condition, which is if Page URL > Contains > ?tips=yes.

Similar to what we did in the first version, we included the cookie shortcode again, this time to replace the cookie value from “2” to “3”.

[ifso-add-cookie name='tips' value='3' time='3600']

3rd version – removing the cookie

Since we don’t want to keep showing pop-up #2 if the user revisits the page, we have set another version and placed it above the version of pop-up #2. The version doesn’t consist of content, only a shortcode that removes the cookie we have set in the previous version:

[ifso-remove-cookie name='tips']

Default version

We left the default version blank since we don’t want the pop-up to be displayed if none of the conditions are met.

#6 Creating a secret discount (Easter egg)

Apply a discount if a user clicks a certain element (or elements)

Conditions/features in use: Cookie (or page URL) & Trigger Events Extension

Click the genie lamp once, twice, thrice… After the third click, the hidden discount will be available to you, and you’ll be automatically redirected to the plans page.

No coding is required. The clickable element can be made using our “Assign a cookie” wrapping shortcode, and the custom prices are displayed using the cookie condition.

How we did it

We used our “Assing a cookie on click” shortcode to wrap the image of the genie lamp. We set the shortcode to assign a cookie with the name “genie” and the value “yes” after 3 clicks. This redirects the user to the plans page. You can see the shortcode and the parameters we used below:

[ifso_onclick_redirect url='https://www.if-so.com/plans' clicks='3' cookie_name='gennie' cookie_value='yes' expires='1']

<img src="https://www.if-so.com/wp-content/uploads/2022/02/gennie-live-example.png">

[/ifso_onclick_redirect]

The “Add a cookie on click” shortcode functionality is part of the trigger events extension. You can learn more and download it here.

Displaying custom prices on the plans page

We created a new If-So trigger with a cookie condition:
If: Cookie name > genie & Cookie Value > yes, exist in the user’s browser; Then: Show the custom prices

hidden discount trigger

Related Articles