Advanced Settings
Passing Payload Values
19 min
overview momentscience supports passing customer and order attributes, referred to as payload values, into offer units and apis these values enable dynamic personalization, advanced targeting, detailed reporting, and real time data synchronization payloads enhance the user experience and improve campaign performance by customizing content based on known attributes, such as firstname , email , or placement payload values can be received back via conversion postbacks these values enable real time integration and synchronization of conversion data with external systems, allowing immediate updates based on user actions what payloads enable personalized creatives use macros (e g , {{firstname}} ) in offer creatives to display personalized messages like βjohn, your order is complete!β advanced targeting deliver offers based on payload conditions like geography, age, or zip code attribution & reporting track performance using custom parameters to understand where and how users interact with offers loyaltyboost offer support attribute user activity to specific partners and unlock loyalty rewards using identifiers such as loyalty program id conversion postbacks payloads are returned in postbacks to facilitate real time syncing of conversion events with your backend or crm systems guidelines for passing payloads to ensure consistent performance and avoid unintended behavior, follow these best practices when passing payload values up to 10 custom attributes are supported per request we recommend keeping each value under 128 characters to ensure efficient processing and prevent misuse (e g , excessive data storage) there are no enforced restrictions on attribute names, but they should be alphanumeric and use underscores where necessary while no hard limits are currently enforced, character or attribute limits may change in future versions of the platform without prior notice avoid including sensitive pii beyond what is necessary passing payload values required attributes the following are critical for basic functionality and must be included when passing payload values true 123,537 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type reserved attributes momentscience supports flexible key value payloads, but certain attributes have predefined behavior within the system these reserved attributes control how offers are targeted, styled, or reported use them only for their intended purpose to avoid unexpected behavior across momentscience products true 140,520left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type custom key value attributes you can pass custom key value payload attributes to include additional details, which are included in conversion reports and used to analyze impressions, clicks, and user behavior these payloads also help match relevant offers to users custom key value payloads provide two key advantages real time sync with your systems via conversion postbacks custom analytics and performance segmentation passing custom key value attributes membershipid "a45gre987343pkd", source "email", interests "gardening" recommended attributes the following payload attributes are not required but are strongly recommended including them improves offer targeting, personalization, and reporting capabilities across momentscience products true 164,496left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type example usages for payload attributes payload attributes unlock advanced functionality such as user identification, traffic source tracking, and personalized experiences below are common use cases with implementation examples tracking the source of offers to analyze where your offers are shown or clicked, use the placement and/or subid attributes these values can be anything meaningful to your tracking or analytics setup placement indicates the page or screen (e g , order success) subid optional field used for affiliate style tracking or campaign tagging js sdk window\ adpxuser = { placement "post transaction", subid "offer test group 1" }; api request body { "placement" "account rewards page", "subid" "email promo july" } direct offer link https //trk pubtailer com/sdk/offer click?o id=1234\&placement=confirmation page\&subid=email promo julyhttps //get perkswall com/offerwall?accountid=xyz789\&o id=3923\&placement=checkout done\&subid=affiliate 21 passing contextual information with tags in addition to standard payloads, you can pass contextual hints using the tags attribute this can help tailor which offers are rendered to the user based on preferences or segments accepts either a comma separated string or an array of strings useful for passing user interests, behavior tags, or session context tag matching is case insensitive and ignores formatting differences all inputs are automatically converted to lowercase and hyphenated (e g , "home page" becomes "home page") this normalization ensures consistent matching regardless of the input format window\ adpxuser = { tags \["fitness", "loyalty user", "high value"] }; perkswall or momentperks api request boby { "tags" "gaming,frequent buyer" } the tags attribute only applies to the following types of implementations docid krjztx8lw1sog hyh2px docid 2un6uwr7 uyb7ctvyhyy docid\ zpol4dx0bohl2aooyzrlq supported methods for passing payload values payload attributes can be passed through different momentscience integration methods, depending on your implementation below are supported methods and guidance on how to structure payloads for each moments api you can pass payload values using the moments api by including them as key value pairs in the json request body these attributes help define context, enable personalization, and improve reporting there is no hard limit to the number of attributes, but we recommend no more than 10 custom fields per request perkswall api similar to the moments api, the perkswall api supports passing payload values as a json object in the request body attributes can include standard, reserved, or custom fields use this method to enrich user context for better offer relevance and segmentation moments js sdk (for websites) in web environments using the js sdk, payload values are passed using the global window\ adpxuser object this object must be defined before the sdk is initialized passing payload values using js sdk window\ adpxuser = { email "user\@example com", firstname "john", zipcode "74839", theme id "momentscience post transaction", country "us", adpx fp "df983hgjdl9023klasjd", placement "post transaction", loyalty program id "23445665393" }; always initialize window\ adpxuser before loading the sdk script direct offer links for direct offer links, append payload values as query parameters to the offer url this allows simple one click tracking and personalization direct offer link that includes two payload attributes user id and order id https //trk pubtailer com/sdk/offer click?o id=xxxx\&c id=xxx\&p id=xx\&user id=3a99022vv\&order id=402230000 the same method to add payload values in direct offer links can be used on click url values returned in the offer catalog api response perkswall direct offer links perkswall supports direct offer links in the same mannerβvia query parameters in the url perkswall direct offer link that includes two payload attributes user id and order id https //get perkswall com/offerwall?accountid=99e58babc94df55a\&offer count=9\&auto show=true\&show logo=true\&show header=true\&show shadow=false\&show image=true\&o id=3923\&user id=3a99022vv\&order id=402230000 these values are accessible in reporting and can be returned in conversion postbacks if you encounter any issues or need support during integration, contact us at mailto\ help\@momentscience com