The MM_Member_Decision smarttag is used to show or hide content based on information associated with the currently logged in member. For example, you can use it to only show an advertisement to free members or to display messaging to members whose account is paused.
Attributes
isMember
(optional) - Checks if the current visitor is a member or not. Acceptable values are true
or false
.
isFree
(optional) - Checks if the current member has a free membership or not. Acceptable values are true
or false
.
status
(optional) - Checks the status of the current member's membership level. Acceptable values are active, paused, canceled, expired, overdue, locked,
pending_cancel
is also a valid value for SmartTags 2.1 or above. Takes a single status or a SmartTag equation incorporating multiple statuses. You can also precede the status with a '!' to check if the current member does not have that status.
membershipId
(optional) - Takes a single membership level ID or a SmartTag equation incorporating multiple membership level IDs. You can also precede the ID with a '!' to check if the current member does not have that membership level.
daysAsMember
(optional) - Takes an integer and specifies the number of days the current member needs to have been a member in order to see the content contained in this tag. You can also precede the number with a '-' to indicate that the member should've been a member less than the number in order to see the content contained in this tag.
hasBundle
(optional) - Takes a single bundle ID or a SmartTag equation incorporating multiple bundle IDs to check if the current member has the bundle active on their account. You can also precede the ID with a '!' to check if the current member does not have that bundle.
daysWithBundle_#
(optional) (SmartTags 2.1 or above) - Takes an integer and specifies the number of days the current member has to have a particular bundle in order to see the content contained in this tag. You can also precede the number with a '-' to indicate that the member should've had the bundle less than the number in order to see the content contained in this tag. Replace the '#' symbol with the ID of the bundle to check. For example, if the bundle you want to check has an ID of 5 then you would use [MM_Member_Decision daysWithBundle_5='2']
. This means that the member should have the bundle with ID 5 applied to their account for 2 days or more to see the content contained in this tag.
Note: this attribute only checks the number of days that the customer has had a bundle regardless of whether the bundle is currently active on their account. If you want to make sure that only members who currently have the bundle active on their account for a certain number of days see the content, use the hasBundle attribute as well.purchasedProduct
(optional) (MM 2.2.4 or above) - Takes a single product ID or a SmartTag equation
incorporating multiple product IDs to check if the current member has purchased the product. You can also precede the ID with a '!' to check if the current member has not purchased that product.
customField_#
(optional) (SmartTags 2.1 or above) - Takes a single value or a SmartTag equation incorporating multiple values to compare against the value in the current member's custom field with ID #.
For example, if the ID of the custom field that stores job title is 4 then to compare against the current member's job title you would use [MM_Member_Decision customField_4='ceo']
to show content to anyone with the 'ceo' job title, or [MM_Member_Decision customField_4='!(ceo)']
if you are trying to show content to anyone without the 'ceo' job title.
When comparing values of text fields, radio buttons or drop downs, a case-insensitive comparison is used. When comparing the value of a checkbox, use the string mm_cb_on
to check if it's currently checked and mm_cb_off
to check if it's currently unchecked.
Usage
If you use multiple attributes for a single decision, it results in an AND relationship. For example, if you write:
[MM_Member_Decision membershipId='1' hasBundle='4']
This means, show this content if...
the current member's membership ID equals 1
AND
the current member has the bundle with ID equal to 4
Here's another example:
[MM_Member_Decision membershipId='1|2' hasBundle='3' daysAsMember='4']
This means, show the content contained in the tag if...
the current member's membership ID equals 1 OR 2
AND
the current member has the bundle with ID equal to 3
AND
the current member has been a member for 4 or more days
When using the [MM_Member_Decision]
tag, you must always include an opening and closing tag. The content between the opening and closing tags can be any valid HTML or JavaScript and it can also contain other MemberMouse SmartTags including other decision tags with the exception of the [MM_Member_Decision]
itself. The [MM_Member_Decision]
cannot be used within itself or nested. Here are some valid examples:
Example #1
[MM_Member_Decision membershipId='1' hasBundle='2|6']
Hi [MM_Member_Data name='firstName']!
This content is directed specifically toward members with a membership level ID of 1 who also have an bundle ID of either 2 or 6.
[/MM_Member_Decision]
Example #2
[MM_Member_Decision membershipId='1']
[MM_Affiliate_Decision affiliate='superguy']
You came from affiliate 'superguy'
[/MM_Affiliate_Decision]
This content is directed specifically toward members with a membership level ID of 1.
[/MM_Member_Decision]
Example #3
[MM_Member_Decision membershipId='2|3|5']
This content is directed specifically toward members with a membership level ID of 2, 3 or 5.
[/MM_Member_Decision]
Example #4
[MM_Member_Decision daysWithBundle_2='4' hasBundle='2']
Members with access to this bundle will see this at 4 days
[/MM_Member_Decision]
Example #5
[MM_Member_Decision daysWithBundle_2='-14' hasBundle='2']
Members with access to this bundle will see the content until day 14
[/MM_Member_Decision]