Skip to main content

mbr_is_user_agent

Usage

This shortcode determines the content to be included based upon the existence of the specified user_agent.

Parameters

ParametersDescription
nameSpecify 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

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]

API

Note

There is currently no ActiveMember360 API function equivalent for this shortcode.