Modals may not be for everyone! Building your contact list is important but you need to be sensitive to the user experience when interrupting their session. You have complete control over what pages will show what modals within Voyage. In this article we will show you how to create patterns to specify what pages (or groups of pages) should present the modal (pop-up) you are building.
- Navigate to Allowlist / Blocklist Setting
- Nature of the Pattern List
- Syntax Characters
- Testing Patterns
- Example URL Patterns and Tests
Navigate to Allowlist / Blocklist Setting
To access the modal allowlist / blocklist, first click on List Building in the main menu on the left . From there, look for the Options column on the far right and click on the ellipses  for an existing list building campaign. Then click on Edit Modal . If you don't have an existing campaign to edit, click on the New List Building Campaign button in the top right :
Look for the Settings tab near the top and click on it  where you’ll find the Allowlist / Blocklist Pages option  that can be expanded to see the pattern list itself. This is the same process you’ll go through when creating a new list building campaign:
Nature of the Pattern List
You can specify the path folder(s) in a pattern, or you can specify query parameters in a pattern. The order of the patterns doesn’t matter.
Note, all path patterns are relative, meaning you should not include the root domain name in your pattern. Put only one pattern on each line in your pattern list.
The pattern list is by default a blocklist, meaning that everything is allowed by default when empty. Your pop-up model will show on every page when your pattern list is empty. When you add only negative patterns then the list is a blocklist. Only those URLs that match your negative patterns will be blocked.
However, if you add only positive patterns, then the list behaves as an allowlist. Everything is blocked except URLs which match your patterns.
If you have both positive and negative patterns in your list, then the list behaves as an allowlist. Any URLs that don’t match any patterns are blocked by default.
Note that if one pattern says a URL should pass, and another pattern says a different part of that same URL should be blocked, the block will always take precedence over an allow pattern.
In addition to the two aforementioned pattern types (path and parameter), you have a number of syntax characters you can apply in each pattern.
|*||Matches one wildcard path segment either before or behind specified segment||/cart/* would include /cart/checkout/ or */shopping/ would include /home/shopping/|
|**||Matches any number of wildcard path segments either before or behind specified segment||/cart/** would include /cart/checkout/confirmation/|
|!||Negate / block specified pattern||!**/cart/** would block all URLs that contain /cart/ anywhere in their path|
|?||Query parameter specification - can support multiple parameters separated by &||?utm_source=loyalty would include any URL that has the string &utm_source=loyalty|
You can combine multiple path elements in a single pattern (such as /cart/checkout/), and you can also combine multiple parameter elements in a single pattern (such as ?source=promo&origin=us). But you can not put path elements and parameter elements in one pattern, they must be on separate lines / patterns in your pattern list.
As you compose your patterns in the pattern list , you may want to validate if a specific URL will be allowed or blocked for modal presentation. Simply paste the URL you want to test into the Test Pattern field  and look for a green check mark (indicating allowed) or red stop symbol (indicating blocked) to the right :
Example URL Patterns and Tests
Take some time to play around with your own patterns and URLs until you feel comfortable with the logic. Here are several other small pattern lists and test pattern results to help you get a feel for what is possible and how the allowlist / blocklist works:
|/shop/**||A positive path pattern. Show the model on all subpages of the shop. All other pages not specified will be blocked.|
|!/blog/**||A negative path pattern. Do not show the modal on any blog pages. All other pages not specified will be allowed.|
|!?utm_source=Instagram||A negative query parameter pattern. Do not show the modal on any pages from a specific source, in this case Instagram.|
|A positive query parameter pattern. Show the model for links from a specific source and from a specific campaign (must meet both requirements).|
|Notice there are two patterns on separate lines. Shows the model for links from a specific source or from a specific campaign (can meet either requirement).|
|One pattern is positive, the other is negative. Show the model on all subpages of the shop. All other pages not specified will be blocked. The !/blog/** parameter is superfluous.|
|The Test Pattern example.com/blog/hello.html&source=mexico is blocked, even though the **/blog/** pattern says it should pass. Explicit block patterns override allow patterns.|
If you have any additional questions please contact us at firstname.lastname@example.org.