There are cases where you do not want to show the smart app banner on all Android and/or all iOS devices. For example:
your app is availabe only for some Android/iOS versions
your app is only availabe on iPhone, but not iPad
your app is a web app which also shows this website, but of course should not show the smart app banner.
In this case you can define a regular expression, which matches all user agent strings that should be excluded. Just add another meta tag like the following:
<meta name="smartbanner:exclude-user-agent-regex" content="^.*My Example Webapp
quot;>
This regular expression would match any user agent string, that ends with My Example Webapp.
Show the smartbanner for certain User Agents
In addition to blacklisting certain user agents using the regex explained in the previous section, you can also whitelist certain user agents:
Note: You can define enabled-platforms, exclude-user-agent-regex and include-user-agent-regex at the same time. enabled-platforms has the lowest priority, exclude-user-agent-regex the highest priority.
Disable Positioning
If you want to position smart app banner yourself (e.g. in CSS), you can disable built-in positioning with following option:
By default smartbanner would not reappear if closed. This can be prevented with hide-ttl option. Following example would keep smartbanner closed for 10 seconds (10000 ms):
Once closed smartbanner would reappear if site path changes. It is default behaviour.
Following example would keep smartbanner closed site-wide (but only when user has actually closed it):
<meta name="smartbanner:hide-path" content="/">
Custom design modifier
smartbanner uses built-in platform-specific styles (e.g. smartbanner--ios or smartbanner--android), but this behaviour can be altered by adding custom design modifier that allows use of: