mbr_is_user_agent
Usage
This shortcode determines the content to be included based upon the existence of the specified user_agent.
Parameters
| Parameters | Description |
|---|---|
| name | Specify one or more user agents in a comma delimited string. Since a visitor cannot have more than one user agent, any matching agent will resolve to true if more than one is specified. Default: none. Required: yes. |
Permitted user agent names are:
| Name | |
|---|---|
| android | |
| apache | |
| blackberry | |
| chrome | |
| edge | |
| ff | |
| firefox | |
| gecko | |
| ie | |
| iis | |
| iis7 | |
| ipad | |
| iphone | |
| ipod | |
| kindle | |
| lynx | |
| macff | |
| macie | |
| mobile | |
| ns4 | |
| opera | |
| operamini | |
| operamobi | |
| safari | |
| silk | |
| winff | |
| winie |
Validity
This shortcode is evaluated for any type of visitor.
Conditional Branching
[ELSE_is_user_agent] conditional branching is supported.
Nesting
Shortcode nesting is supported:
[mbr_is_user_agent1] thru [mbr_is_user_agent19]
[ELSE_is_user_agent1] thru [ELSE_is_user_agent19]
[/mbr_is_user_agent1] thru [/mbr_is_user_agent19]
Examples
- Example 1
- Example 2
Displays "User agent is Firefox." if the user agent is firefox. Otherwise will display "User agent is NOT Firefox.":
[mbr_is_user_agent name='firefox']
User agent is Firefox.
[ELSE_is_user_agent]
User agent is NOT Firefox.
[/mbr_is_user_agent]
Displays "User agent is Chrome or Edge." if the user agent is chrome or edge. Otherwise will display "User agent is NOT Chrome or Edge.":
[mbr_is_user_agent name=chrome,edge]
User agent is Chrome or Edge.
[ELSE_is_user_agent]
User agent is NOT Chrome or Edge.
[/mbr_is_user_agent]
API
Note
There is currently no ActiveMember360 API function equivalent for this shortcode.