
Referral
How can your site benefit from referral source?
Usage examples:
- Display special promotions to visitors arriving from a chosen website.
- Source data from Google Analytics to promote content based on preferences or interests of other similar users to your site.
- Encourage users who arrive from social media networks to like and share your content via the network from which they arrived.
- Display different phone numbers (or contact forms) in order to track the results of your marketing efforts or collaborations with different sites.
- Show special messages to visitors referred by local domain URLs (E.g. Show a short message in German to visitors arriving from URL’s ending in .com.de.).
Possible Use Cases
Display different phone numbers in order to track the results of your marketing efforts or collaborations with different sites.

Display special promotions to visitors arriving from a chosen website

What is your referrer?
For your convenience, you can paste the following shortcode on your page. Then, visit the page by clicking the search result in Google (or any other search engine) to see the exact referrer.
[ifsoDKI type='referrer']
Click here to see your HTTP/HTTPS referrer.
Referral Source: Page on your website
Use the page on your website referral source condition to display custom content to visitors arriving from certain pages on your website. This option is useful for cross-selling, upselling, and bringing users back to the sales funnel.
How to set up a Page on your Website referral source condition:
*Elementor or Gutenberg user? This condition can be used to set up a conditional element or block (Learn more: Gutenberg | Elementor).
- On your WordPress dashboard, go to “If-So → Add New Trigger”.
- Click on “Select a condition” and select “Referral source”.
- Select “Page on your website”.
- Chose a page from the “Select page” drop-down menu.
- In the content field, set the content to be displayed if the condition is met.
- In the default content field, set content to be displayed if the condition is not met (optional, you can also leave this blank).
- Press “Publish” and paste the shortcode generated by If-So on your website wherever you want it to be.
Referral DKI Shortcodes
Customize the fields to generate your shortcode, then copy and paste it wherever you want the dynamic value to appear.
Referrer – DKI builder
Display the referring URL or domain that led the user to the site. Demo.
Referral Source: Custom URL
Use the Custom URL condition to display dynamic content to visitors arriving from certain websites or web pages.
Example: If → URL is → Google.com ⇒ Then → Display custom content
How to set up a Custom URL referral source condition:
- On your WordPress dashboard, go to “If-So → Add New Trigger”.
- Click on “Select a condition” and select “Referral source”.
- Select “URL”.
- Select an operator: “URL is” / “URL contains” / “URL is not” / “URL does not contain”.
- Type in a domain, a webpage URL, or a term.
- In the content field, set the content to be displayed if the condition is met.
- In the default content field, set content to be displayed if the condition is not met (optional, you can also leave this blank).
- Press “Publish” and paste the shortcode generated by If-So on your website wherever you want it to be.
The referral source condition will not work when referring from Https protocol to Http protocol. If your website is on Http protocol, and the referrer is an Https website you can use the dynamic link condition instead.
The following table presents operators and actual referrals. It illustrates whether dynamic content will be displayed or not displayed if your website is on Http protocol
| Operator | Domain/ URL/ Term set by the admin | Visitor’s actual Referrer | Result (Will dynamic content be displayed?) |
|---|---|---|---|
| URL is | shoes.com | http://shoes.com | Yes |
| http://www.shoes.com | Yes – The condition is met whether you write www or not | ||
| https://www.shoes.com | Yes – If your site uses an HTTPS protocol No – If your site uses an HTTP protocol |
||
| https://shoes.com | Yes – If your site uses an HTTPS protocol No – If your site uses an HTTP protocol |
||
| URL contains | shoes | http://shoes.com | Yes |
| sh | http://shoes.com | Yes – It doesn’t matter where in the URL your letters appear | |
| red | http://shoes.com/red | Yes – It doesn’t matter where in the URL your term appears | |
| red | http://red.shoes.com | Yes – It doesn’t matter where in the URL your term appears | |
| .com.de | http://shoes.com.de | Yes | |
| URL is not | shoes.com | http://clothes.com | Yes |
| URL does not contain | shoes | http://clothes.com | Yes |
Screenshots









FAQs
- Does If-So work with server-side and WordPress caching solutions?
Yes.
Whether you are using a caching plugin or server caching, you can navigate to the plugin settings and enable the “Page Caching Compatibility” option.
With the option enabled, dynamic triggers will be rendered in a separate request that will take place after the loading of the cached version.
- Is it possible to set up conditional redirects (redirecting users to different pages based on conditions)?
Yes, you can set up conditional redirects based on any If-So condition.