Skip to main content

mbr_tag

Usage

This shortcode adds and/or removes specified tags, to/from either the logged in user contact record in ActiveCampaign, or to/from the contact specified.

The shortcode can be run automatically or used to generate a button or link within a page or post that, when clicked, will add or remove a specified tag to/from the contact record.

Parameters

ParametersDescription
cidThe ActiveCampaign contact ID of the contact to add tags or remove tags.
Default: Current logged in user contact ID.
Required: no.
assignOne or more tag ID's or tag names defined within ActiveCampaign to add to the contact. The available tags can be found in ActiveMember360, Utilities, Tags. If more than one is entered, please separate with commas.
Default: none.
Required: Yes if remove parameter not set.
removeOne or more tag ID's or tag names defined within ActiveCampaign to remove from the contact. The available tags can be found in ActiveMember360, Utilities, Tags. If more than one is entered, please separate with commas.
Default: none.
Required: Yes if assign parameter not set.
autocreate_tagsIf set to yes non-existent tags in your ActiveCampaign application specified for the assign_tags parameter will be automatically created. If the tag does not exist the value for assign_tags will be used as the tag name.
Default: yes
Required: no.
autorunIf set to yes the shortcode will execute without waiting for user input. Otherwise it will generate a form and a submit button or link_style and wait for user input. If set to yes the following parameters will be ignored; link_text, link_style, button_text, button_image, button_style, redirect_popup, aftertext.
Permissible Values: yes
Default: none.
Required: no.
link_textThe text to display for the link.
Default: Click here to submit
Required: no.
link_styleThe CSS style to apply for the link.
Default: mbr_tag_link
Required: no.
button_textThe text to display on the button.
Default: Click here to submit
Required: no.
button_imageThe URL of the image to use for the button.
Default: none.
Required: no.
button_styleThe CSS style to apply for the button.
Default: none.
Required: no.
redirectThe URL to send the user to after assigning/removing the tags. A special value can be passed, #reload#, to force all shortcodes on the page to resolve based on the latest changes that may have been introduced by the tag changes.
Default: none.
Required: no.
redirect_popupSpecifies whether the user will be redirected to a new window after clicking the link or button. Only used if the redirect parameter is set.
Permissible Values: yes
Default: none.
Required: no.
after_textThe text that should be displayed after the shortcode has been processed, if the user hasn’t been redirected.
Default: Your request was processed
Required: no.
Tag ID's vs. tag names

The use of tag ID's over tag names is encouraged. Unless a tag is deleted, its tag ID can be considered persistent and unique. Tag names, on the other hand, can be changed at any time and do not need to be unique. Using a tag name that is not unique or has been changed can cause your shortcode, hook or module to no longer work as expected.

Validity

This shortcode is only processed for logged in users who also exist as contacts within ActiveCampaign.

In all other cases, including WordPress users with the Administrator role nothing will be processed.

Conditional Branching

This shortcode does NOT support conditional branching with [ELSE_tag].

Nesting

Shortcode nesting is NOT supported.

Examples

Remove tags with IDs 123 and 45 from and then assign tags with IDs 55, 66, and 77 to the current logged users ActiveCampaign contact record after they click the button labelled 'Click here'. When processing has completed display 'Your request was processed':

[mbr_tag assign='55,66,77' remove='123,45' button_text='Click here']

API

Note

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