Skip to main content
Display Rules
Davey Jones avatar
Written by Davey Jones
Updated over a week ago

f Other Rules (Javascript, Cookie, Meta Tags, and more)


Understanding Sumo Display Rules

By default your Sumo apps will display on all pages, but you can use Display Rules to determine where various Sumo Apps will display on your site. The behavior of a Sumo app is split between Show and Don't Show rules. These rules can be set independently of one another, or set in conjunction with another to create more advanced conditional rules.

Setting up Show rules will configure your Sumo apps to display only when the conditions set in your display rules are met.

sr.png

Setting up Don't Show rules will configure your Sumo apps to display on all pages except when the conditions set in your Don't Show rules have been met.

dsr.png

Setting up both Show and Don't Show rules configures your apps to display both when the conditions in your Show rules are met, and not display when the conditions in your Don't show rules are met.

Note: Don't Show rules will always take precedence if there is a conflict between Show and Don't Show rules.


Setting Up Display Rules

List Builder

1 To set up Display Rules in List Builder, open up a Form you want to set Display Rules for and click on the Visibility tab. (Make sure Manual mode is enabled in the Visibility tab.)

dr_2.png

2 Click Add New Rule to create a Display Rule (for this Form only). Display Rule "sets" can be saved and loaded from here as well, if you wanted to use the same set of Rules on different Forms.

dr_1.png

Other Sumo Apps

Aside from List Builder, all other Sumo apps' Display Rules can be configured as well.

1 For example, to find Display Rules in the Share app, open up the app and find the Display Rules tab at the top of the window.

2 Next, click Add New Rule to create a new Display Rule.

dr_4.png

Adding To Rules

It is important to note that Display Rules can be used in combination with another to create more advanced, conditional rules. When you have 2 separate Display Rules, they don't work together since they are working as Rule A OR Rule B. As an example, if you add 2 separate rules on your form that say:

"Show on URLs containing blog"

"Show on Desktop devices"

Those rules will work as either "show the form on URLs containing blog OR show on desktop devices". If you want those rules to BOTH apply to the form as 1 overall rule, you would want to create the first rule and then add the second rule to the first rule. In this case, the rules will work as "show on URLs containing blog IF the user is on a desktop device".

1 This can be done by clicking the "+" next to any rule.

dr_5.png

2 Next, select the rule you would like nested within the first.

dr_6.png

3 The result will look like the following, and the result will be a form that displays on the Homepage IF the visitor is viewing on a desktop device.

dr_7.png

Live Example of Nested Display Rules


Display Rule Types & Descriptions

URL Display Rules

1.png

Paths

Options

Exactly Matching | Beginning With | Containing

Example

url_paths.png

Explanation

This rule will show your form for exact URL matches (https://mysite.com/page1), sites beginning with a URL (https://mysite.com/blog), or pages containing a word, phrase, or slug (/blog, /categories, /shirts). This rule will show the app/form only on pages beginning with /blog.

Use this rule to target specific pages of your site or sections & categories within your site.

e.g. https://yoursite.com/blog/sumo-rules

With A Query Parameter

Options

Exists | Does Not Exist | Is Equal To | Does Not Equal | Contains | Does Not Contain

Example

utm_parameter.png

Explanation

The rule will show the app/form only when the visitor's URL has utm_campaign=facebook in it.

e.g. https://yoursite.com/?utm_campaign=facebook

With A Hash

Options

Exactly Matching | Beginning With | Containing

Example

hash.png

Explanation

This rule will show the app/form only when the visitor's URL has #sumolife in it.

e.g. https://yoursite.com/#sumolife


Page Type Rules

2.png

Homepage

Example

homepage.png

Explanation

This rule will show the app/form only on your home page.

e.g. https://yoursite.com/

Article Pages

Example

articles.png

Explanation

This rule will show the app/form only on pages that Sumo detects an article on.

Note: if Sumo detects multiple articles on a page, it's considered an index of articles and will not show.


Device Rules

3.png

Desktop

Example

desktop_devices.png

Explanation

This rule will show whenever the browser width is greater than 480px.

Mobile

Example

mobile_devices.png

Explanation

This rule will show whenever the browser width is less than 480px.

With Sizes

Options

Bigger Than | Smaller Than

Example

sr_s.png

Explanation

This rule will show whenever the browser width is less than or greater than the specified pixel amount.

OS

Options

Android | iOS | Windows Phone/Mobile | Mac | Ubuntu | Windows

Example

os_rule.png

Explanation

This rule will show the app/form only on devices using the specified Operating System.

Browser

Options

Chrome | Firefox | Internet Explorer | Opera | Safari

Example

device_browser.png

Explanation

This rule will show the app/form only on devices using the specified Browser.

IP Address

Example

ip_address.png

Explanation

This rule will show the app/form only when visitors with the specified IP address are viewing your site.


Referrer Rules

4.png

Referrer Domain Names

Options

Exactly Matching | Begins With | Containing | Matching [SERVICE]

Example

referrer_domain.png

Explanation

This rule will show the app/form only when the visitor is coming from a Google.com referrer domain.

Referrer URLs

Options

Exactly Matching | Begins With | Containing | Matching [SERVICE]

Example

referrer_url.png

Explanation

This rule will show the app/form only when the visitor is coming from a specific URL.

e.g. https://somesite.com/some-page/


Visitor Behavior Rules

5.png

Visitor's First Page View

Example

visitors_first_pageview.png

Explanation

This rule will show the app/form only when the visitor is on their session's first page view on your website.

Note: Sessions expire after a certain period of time.

Visitors Page Views

Options

Fewer Than | Exactly | Greater Than

Example

visitors_page_views.png

Explanation

This rule will show the app/form only when the visitor has visited at least 3 pages on your site during a given session.

Location

Options

Country | State | City

Example

visitor_location.png

Explanation

This rule will show the app/form only when the visitor's IP address is from the United States.

Date

Options

Before / After | [DATE] | [TIME] | [TIMEZONE]

Example

visitor_date.png

Explanation

This rule will show the app/form only after 12:00 AM CST on November 9, 2017.


Other Rules

6.png

Cart Total

Options

Less Than | Less Than Or Equal To | Greater Than | Greater Than Or Equal To

Example

sr_ct.png

Explanation

This rule will show the app/form only for visitors with the designated cart total (Shopify only)

Cart

Example

sr_c.png

Explanation

This rule will show the app/form only for visitors with carts that contain an item with designated product_id, sku, etc. (Shopify Only)

User Agents

Options

Exactly Matching | Begins With | Containing

Example

other_user_agent.png

Explanation

This rule will show the app/form only for visitors with "Mozilla" in their browser's User Agent string.

For more information on user agents, read more here.

Meta Tag

Options

[AttributeName] | Starts With / Equal To / Not Equal To / Contains / Does Not Contain | [AttributeValue]

Example

other_meta_tag.png

Explanation

This rule will show the app/form only on pages where the following meta tag is present:
Note: If you are targeting a specific meta tag, you will need to nest two Meta Tag rules.

Cookie Named

Options

[CookieName] | Exists / Doesn't Exist / Equal To / Not Equal To / Contains / Doesn't Contain | [CookieValue]

Example

other_cookie.png

Explanation

This rule will show the app/form only on pages where the visitor has a cookie set in their browser named loggedIn with a value of true.

Note: Sumo can only see non-httpOnly cookies.

Javascript

Options

[Variable/Function] | Exists / Doesn't Exist / Equal To / Not Equal To / Less Than / Greater Than / Custom

Example

other_javascript.png

Explanation

This rule will show the app/form only on pages where the visitor has a JavaScript variable set in their browser named isUser with a value of true (in order for Sumo to detect variables, attach the variable to the window object (i.e. window.variableName)).

Note: If you use the "Custom" option, the form will display if specified function returns a true boolean value (the function must be an immediately invoked function expression (IIFE)).

Targeting Options Available

Examples and Success Suggestions

Did this answer your question?