Macros can generate a response that is specific to the user’s characteristics. For example, your ad can display the contact details of a particular store in your chain based on the user’s location, send a text message with the details of a specific image in a gallery, and so on. Macros are composed of a source and a responding entity.

Possible Sources

  1. Tag: macros can be entered directly into the tag.
  2. URL: of the page the user was browsing when interacting with the ad.
  3. Field: value entered into a field.
  4. Counter: current value of a counter.
  5. Random: a randomly generated number, between 1 and 1,000,000. This number is added to URLs to bypass the cache. Use ‘Random’.
  6. Distance: the label or coordinates of an item from a list of addresses in the Distance widget. Use ‘label’ or ‘coords’.
  7. Gallery: the ID image the user interacted with. Use ‘imgID’.
  8. Video: the completion (in percentages) of the video. Use ‘vid%’.

Possible Responding Entities

  1. Submit widget.
  2. External Content widget: in IFrame mode.
  3. Track URL action.
  4. Map widget: Destination field.
  5. Text widget.
  6. Video widget.
  7. Call widget: Phone Number field.
  8. SMS action: Phone Number field.
  9. Send Email action: all fields.

Referencing Sources

A macro must understand where the source is – it must be able to reference it correctly.

To reference a source, its full address must be given. For example, for a widget on page 2 of the ad, the page name and widget name must both be used: {Page2.Counter3} references a widget called Counter3 on a page called Page2.

For some widgets, a further reference must be added to the address for the macro to identify the correct bit of information in the referenced widget. For example, {Page1.Gallery4.imgID} tells the macro that the relevant bit of information in the Image Gallery widget on Page1 is the ID of the currently displayed Image.

Tip: when you do not provide a full address, the macro assumes the source of information is in the ad’s tag.

Usage Example: Using the Tag to Modify a Destination URL

In this example, you use a single ad in several websites, and you want the tag used in each website to direct the user to a different URL when your ad is clicked.

In the ad, place an ‘Open URL’ action on a widget, for example the Gallery. In the ‘Open URL’ action, rather than entering a regular URL, enter a URL containing a macro: http://www.{specialURL}.com.

Tip: you can name your macros as you see fit.

Now the ad has a macro response, but it still has no macro source. In the ad tag, add the code snippet:

justAdTrackingMacros = {
specialURL: ‘fromSite_One’,

! Note: never use double-quotation marks in the tag.

The snippet is composed of the field you identified in the ad and the value you assigned to it. When the user clicks the widget, the ‘Open URL’ action checks the ad’s tag for information to place in the macro, and the user is directed to the correct URL.

When you place the ad tag in a different webpage, you can replace the field’s value to direct users to a different URL. For example, specialURL: ‘fromSite_Two’.

Usage Example: Gallery Image ID with Email Action

In this example, the ad contains a Gallery Widget with four images, and a Visual widget with an ‘On Tap’ Email action. If you want to sort your emails based on the image the user was watching when the email was sent, you can reference that image in the email’s Subject.

To do that, in the email action’s Subject field, instead of entering a plain text, enter {Page1.Gallery.imgID}, or a combination of the two, for example: Image was {Page1.Gallery.imgID}.

! Note: remember to use the widget’s page as the first part of the widget’s reference.

When the user clicks the Visual widget to send an email, the subject of the email contains the ID of the image. On the receiving end, it is then very simple to sort the emails based on their subject.


Was this article helpful to you?

Comments are closed.