Using macros

AdsPostX is now MomentScience! 🎉

We have rebranded AdsPostX to MomentScience. All the latest documentation and updates can now be found at MomentScience Documentation.

Macros allow you to pass information about the order into key elements of the Offer unit to both inform your customer about their completed transaction and optimize the AdsPostX unit for success.

AdsPostX recommends the following macros which can be used during theme customization:

Macro

Usage

{{confirmationref}}

Used to pass the order/transaction confirmation number into the AdsPostX unit. This is helpful because it informs the user that their transaction was complete and focuses their attention on offers.

{{firstname}}

Used to pass the first name of the customer into the AdsPostX unit. This is valuable because it personalises the AdsPostX experience and offers deeper encouragement to consider presented offers.

{{payload_attribute}}

Any other payload attribute can be used as a macro for personalisation for the AdsPostX unit.



In order for macros to function, the corresponding parameter must be passed in the payload. For example, if you intend to use the {{confirmationref}} macro, you must ensure that a value for confirmationref is passed into the payload.

Examples of Macro Usage

Below is an example of macros being used to both personalise the AdsPostX unit and inform the customer that their purchase was complete paving the way for an optimal experience.

Macros can be used when setting the AdsPostX unit's Header and Lead-in Text when customising your themes.

Document image


The macros {{firstname}}, {{confirmationref}}, and {{amount}} are being used to personalise the message to the user.

For the given payload as provided in window.AdpxUser

JS


The macros would result in the following personalised experience:

Document image