SmartTag™ equations are used to allow for more complex comparisons within a single attribute of a MemberMouse SmartTag™. Here's an example of a SmartTag™ equation:
[MM_Member_Decision hasBundle='3|4']
This content will only be displayed if the current member
has the bundle with ID 3 or 4 applied to their account.
[/MM_Member_Decision]
There are currently two different SmartTag™ equation versions, the legacy (very old) format of 2.0 and the recommended format of 2.1. Read this article to learn how to set your SmartTag™ version.
SmartTags™ 2.1
In the following examples, we'll use the Member_Decision SmartTag to demonstrate how to use the SmartTag™ 2.1 equations.
For attributes that support SmartTag™ equations you can:
Use the |
character to indicate an OR relationship
[MM_Member_Decision membershipId='1|2']
This equation will be true if the member has the membership with IDs 1 OR 2.
Use the &
character to indicate an AND relationship
[MM_Member_Decision hasBundle='4&7']
This equation will be true if the member has bundles with IDs 4 AND 7.
Precede IDs with a !
to indicate that it should check if the member does not have that ID
[MM_Member_Decision membershipId='!5']
This equation will be true if the member does not have the membership with ID 5.
Use parentheses to control the order in which parts of the equation are executed
[MM_Member_Decision hasBundle='!1|2']
This equation will be true if the member does not have the bundle with ID 1 OR does have the bundle with ID 2.
[MM_Member_Decision hasBundle='!(1|2)']
This equation will be true if the member does not have the bundle with ID 1 OR the bundle with ID 2.
Let's look at more involved examples:
[MM_Member_Decision hasBundle='(1|2)&!3']
This means, show the content contained in the tag if…
the current member has bundles with IDs 1 OR 2
AND
the member does not have the bundle with ID 3
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 equals 1
AND
the current member has the bundle with ID equal to 4