Macros enable administrators to add dynamic, personalized information into General, Topic, and Advanced bulletins, by inserting a snippet of code that is replaced with a specific piece of information related to a subscriber profile or a piece of communication information.

govDelivery supports three types of macros:

  • Reserved Macros are a standard set of macros that are available for every account. You can use these macros in any govDelivery bulletin, and they are easily available via the Macro menu on the bulletin creation page. You can find a list of all reserved macros later in this article. 
  • Transactional Message Macros are used in the transactional messages that govDelivery sends. Transactional messages include password reset messages, welcome new user messages, etc. For more information about the available Transactional Message Macros, see Transactional Message Macros.
  • Custom Macros use data from Questions to create personalized content. For example, if you asked subscribers for their first and last name during the subscription process, you could create a Macro to address email bulletins to the subscriber "Dear (first name)". For more information about creating custom macros, see Personalizing with Custom Macros.

Managing Macros

Account Administrators can access a list of all available macros and also create custom macros (if this feature has been enabled for your account).

To access macros in your account, click on Macros in the left navigation menu. The macros list is separated into two tabs:

  • Reserved – This tab lists all default macro values that can be used to populate account-level data, like email addresses, account names, email subject lines, and more. To see descriptions of the various reserved macros available, see Reserved Macros.
  • Custom – This tab lists all custom macros that have been created for your account. Custom macros use your subscribers’ responses to questions to populate information in bulletins and template. Custom macros can only be created if you have questions set up for your account. The Custom Macros tab will only appear if Personalization and Questions are turned on for your account. If you do not see the Custom tab and would like to use this feature, contact Customer Support by submitting a request at the bottom of this page.

Note: Custom macros cannot be used in SMS and only two reserved macros can be used for text messages. For more information about using macros within a bulletin and with wireless messages, see Using Macros in a Bulletin.
Note: Macros cannot be used for the “Select One or more” type of question.

Reserved Macros

ACCOUNT_CONTACT_URL

The Account Contact URL Macro resolves to the subscriber contact URL for your account. (Set your contact URL on the Account Information page) When used in a bulletin, the macro token will be replaced with the URL to your contact URL.

The Account Contact URL macro is recommended for use in:

  • Bulletins
  • Templates
  • Bulletin Footers
  • Transactional Messages
  • Subscription Pages

To use: 

Select Account Contact URL from the Macro drop-down menu or type the following:

[[ACCOUNT_CONTACT_URL]]

Note: A drop down list of URL macros is located in the insert link modal when "Macro" is selected as the URL type. However, URL macros are conditional and will only appear if they are compatible with the text editor you are using. 

ALL_ATTACHMENTS

The All Attachments Macro resolves to the name of your govDelivery account. When used in a bulletin, the macro token will be replaced with a list of all attachments for the macro.

To use: 

Enter  or select All Attachments from the Macro drop-down menu.

Notes:

  • If you choose to link attachments, govDelivery will automatically include the macro at the bottom of the bulletin body. All attachments for the bulletin (both linked and attached files) are listed in the macro.
  • On sending, this macro resolves to the word Attachments followed by a list of links to every attachment for the bulletin. Each bullet includes the name of a single file that links to the file.
  • If all attachments are removed from the bulletin, the macro is not automatically deleted from the bulletin body. However, if the bulletin has no attachments, the bulletin resolves to nothing.

BULLETIN_IDENTIFIER

The Bulletin Identifier Macro inserts the bulletin ID wherever it is used. Because the bulletin ID doesn't mean anything to subscribers, we caution against displaying it prominently. 

The Bulletin Identifier macro is meant to be used for internal purposes. For example, you might put it in the footer of your bulletin to help your team easily match up emails your subscribers received with the corresponding bulletin. You can also use this macro in link-tracking parameters, letting you track how much website traffic came from a particular bulletin. For more information about link-tracking parameters, see Tracking GovDelivery Traffic.

To use: 

Select Bulletin Identifier from the Macro drop-down menu or type the following: 

 [[BULLETIN_IDENTIFIER]]

BULLETIN_SENT

The Bulletin Sent Macro resolves to time that the bulletin was sent from govDelivery. This macro is used only on Landing Pages.

The Bulletin Sent macro is recommended for use in landing pages

To use on the landing page template: 

Type the following:

[[BULLETIN_SENT]]

CAMPAIGN_ID

The Campaign ID Macro inserts the campaign identifier wherever it is used. Because the campaign ID doesn't mean anything to subscribers, we caution against displaying it prominently. 

The Campaign Identifier macro is meant to be used for internal purposes. For example, you might put it in the footer of your campaign message to help your team easily match up emails your subscribers received with the corresponding campaign. You can also use this macro in link-tracking parameters, letting you track how much website traffic came from a particular campaign. For more information about link-tracking parameters, see Tracking GovDelivery Traffic.

To use: 

Select Campaign Identifier from the Macro drop-down menu or type the following:

[[CAMPAIGN_ID]]

EMAIL_ADDRESS

The Email Address Macro resolves to the email address of the bulletin recipient. When used in a bulletin, the macro token will be replaced with the recipient's email address.

The Email Address macro is recommended for use in:

  • Bulletins
  • Bulletin Footers
  • Transactional Messages
  • Subscription Pages

To use: 

Select Email Address from the Macro drop-down menu or type the following:

[[EMAIL_ADDRESS]]

ONECLICK_UNSUB_URL

The One Click Unsubscribe URL Macro resolves to a URL that allows the bulletin recipient to unsubscribe from all topics with a single click. When used in a bulletin, the macro token will be replaced with a URL that when clicked unsubscribes the email recipient from all topics in your account.

The One Click Unsubscribe URL macro is recommended for use in:

  • Bulletins
  • Bulletin Footers
  • Transactional Messages

To use: 

Select Oneclick Unsub Url from the Macro drop-down menu or type the following:

[[ONECLICK_UNSUB_URL]]

Note: A drop down list of URL macros is located in the insert link modal when "Macro" is selected as the URL type. However, URL macros are conditional and will only appear if they are compatible with the text editor you are using. 

PAGEWATCH_CHANGE_LIST

The Page Watch Change List  Macro resolves to a list of URLs that have changes since the last time that Page Watch ran. When used in a bulletin, the macro token will be replaced with a bulleted list of updated Page Watch URLs.

The Page Watch Change List macro is recommended for use in templates (for topics utilizing Page Watch). 

To use in a bulletin: 

Generate the bulletin from the Page Watch Change Notification sent to the designated Administrator's inbox.

To add to a topic bulletin template for a topic utilizing Page Watch: 

Select Pagewatch Change List from the Macro drop-down menu or type the following:

[[PAGEWATCH_CHANGE_LIST]]

SHARE_THIS

The Share This Macro resolves to a call-to-action button that automatically provides a link to the web page version of your bulletin:

The Share This macro is recommended for use in:

  • Bulletins
  • Templates
  • Bulletin Footers

When used in a bulletin, the macro token text is replaced with the graphic above. The message visibility setting for your bulletin must be set to Public in order for this macro to work. The graphic appears in test messages as an active link; however, the web page version is not viewable until the bulletin is sent.

To use: 

Select Share This from the Macro drop-down menu or type the following:

[[SHARE_THIS]]

    SHORT_URL

    The Short URL Macro can be used when creating a text message or Twitter tweet for a bulletin. This is done in the Bulletin Channels section. The Short URL macro inserts a shortened URL to the shared bulletin page. This allows administrators to add a #hashtag or other content after the macro, with the remaining character allotment for SMS/text messages and tweets. This macro is only available if you have public bulletin content enabled and only functions when used for a text message or Twitter tweet.

    The View This URL macro is recommended for use in:

    • SMS/text messages
    • Tweets

    To use: 

    In the SMS or Publish to Twitter's Tweet field, type the following:

    [[SHORT_URL]]
    

    Note: A drop down list of URL macros is located in the insert link modal when "Macro" is selected as the URL type. However, URL macros are conditional and will only appear if they are compatible with the text editor you are using. 

    SMS_PWCHANGE

    The SMS Page Watch Change Macro resolves to a notification of Page Watch changes. When used in the SMS portion of a bulletin, the macro token will be replaced with Page Watch changes (see below for detail).

    To use:

    Type the following:

    [[SMS_PWCHANGE]]

    Notes:

    • If the RSS story title and story description are less than 140 characters, the full text of the story title and description are included in the SMS message.
    • If the RSS story title and story description are more than 140 characters, the SMS message includes the story title and a link to either the shared bulletin page (if sharing is enabled) or linked to the RSS story (if sharing is not enabled).
    • If Bundle Page Watch Messages is enabled, the resulting wireless message should include the story title and a tinyurl link to either the shared bulletin page (if sharing is enabled) or linked to the RSS story (if sharing is not enabled).
    • If the RSS story title is greater than 160 characters, the title is truncated.

      SUBJECT

      The Subject Macro resolves to the subject of your bulletin after other macros in the subject are resolved. It is only valid in the Bulletin Twitter and SMS fields.

      The Subject macro is recommended for use in:

      • SMS/Text Messages
      • Tweets

      To use in the SMS or Twitter fields: 

      Type the following:

      [[SUBJECT]]

      SUBSCRIBER_PREFERENCES_URL

      The Subscriber Preferences URL Macro resolves to a URL that takes the bulletin recipients to their subscriber preferences page . When used in a bulletin, the macro token will be replaced with a URL to the subscriber preferences page.

      The Subscriber Preferences URL macro is recommended for use in:

      • Bulletins
      • Templates
      • Bulletin Footers
      • Transactional Messages
      • Subscription Pages

      Note that this macro is best suited for use in Bulletin Footers.

      To use: 

      Type the following:

      [[SUBSCRIBER_PREFERENCES_URL]]
      

      Note: A drop down list of URL macros is located in the insert link modal when "Macro" is selected as the URL type. However, URL macros are conditional and will only appear if they are compatible with the text editor you are using. 

      TOPIC_NAME

      The Topic Name Macro resolves to the name of your govDelivery topic . When used in a bulletin, the macro token will be replaced with the name of the topic.

      The Topic Name macro is recommended for use in:

      • Bulletins
      • Templates
      • Bulletin Footers
      • Transactional Messages
      • Subscription Pages

      To use: 

      Select Topic Name from the Macro drop-down menu or type the following:

      [[TOPIC_NAME]]

      Note: The Topic Name Macro cannot be used in bulletins sent to more than one topic.

        TOPIC_UNSUBSCRIBE_URL

        The Topic Unsubscribe URL Macro resolves to a URL that when clicked unsubscribes the user from updates for a particular topic. When used in a bulletin, the macro token will be replaced with a URL. This macro only unsubscribes the user from a single topic; it does not delete the user from your account. This macro cannot be used in bulletins sent to more than one topic.

        The Account Name macro is recommended for use in:

        • Topic Bulletins
        • Topic Bulletin Templates
        • Topical Bulletin Footers

        To use: 

        Type the following:

        [[TOPIC_UNSUBSCRIBE_URL]]
        

        Note: A drop down list of URL macros is located in the insert link modal when "Macro" is selected as the URL type. However, URL macros are conditional and will only appear if they are compatible with the text editor you are using. 

        VIEW_THIS

        The View This Macro resolves to text that reads, "Having trouble viewing this email? View it as a Web page." The second sentence of the text will be a  link to the shared bulletin page. The message visibility setting for your bulletin must be set to Public in order for this macro to work.

        The View This macro is recommended for use in:

        • Bulletins
        • Templates
        • Bulletin Footers

        To use: 

        Select View This from the Macro drop-down menu or type the following:

        [[VIEW_THIS]]
        

          Tip:

          You can use this macro to customize the text for the link to the shared bulletin page. To do so:

          1. On the Topic Bulletin Template, ensure that the Message Visibility is set to Public. Or if sending a General Bulletin, on the General Bulletin Template, set the Message Visibility to Public.
          2. Create a new bulletin.
          3. Enter the text for your link.
          4. Highlight the text and click the Link button.
          5. In the Link URL field, enter .
          6. Edit the Target and Title fields as desired.
          7. Click Insert.
          Note: A drop down list of URL macros is located in the insert link modal when "Macro" is selected as the URL type. However, URL macros are conditional and will only appear if they are compatible with the text editor you are using. 

          What's Next