Playbooks
Implementing Moments via the Moments JS SDK (Embedded)
19min
overview this playbook serves as a comprehensive guide for implementing the momentscience moments js sdk as an embedded unit within your web page or mobile app the goal is to provide detailed instructions and best practices to help you maximize revenue and enhance customer engagement post transaction moments js sdk momentscience moments js sdk is designed to integrate seamlessly into your existing web infrastructure it provides a powerful tool to deliver personalized offers to your customers at crucial moments in their purchasing journey by embedding the sdk, you can transform the post transaction experience into an opportunity for increased engagement and revenue key features personalized offers deliver targeted offers based on user data to increase relevance and engagement embedded mode integrate offers directly into your webpage or app for a seamless user experience customization options use the momentscience dashboard to easily tailor the appearance and behavior of your offers advanced targeting enhance your targeting capabilities by passing payload values and using macros for personalization real time tracking implement postbacks and callback functions to track user interactions and conversions in real time background by default, the momentscience moments js sdk has the following characteristics single offer display by default, the sdk shows one offer at a time in a sequential manner modal (pop up) container the offers are displayed in a modal or pop up container this modal appears over the current content on the page default js sdk implementation desired implementation as an embedded unit steps to implement the momentscience moments js sdk as an embedded unit on your web page or inside a webview in a mobile app, follow these detailed steps step 1 identify/create the container element 1 identify or create a \<div> element determine where you want the momentscience unit to be displayed on your page create a \<div> element that will serve as the container for the momentscience unit example html step 2 copy & paste the moments js sdk code snippet obtain the sdk code log in to the momentscience dashboard and navigate to the js sdk integration section to obtain the moments js sdk code snippet insert the sdk code into your web page paste the obtained sdk code into the \<head> section of your web page to ensure it loads correctly step 3 enable embedded mode 1 configure the sdk for embedded mode modify the sdk initialization code to specify that it should operate in embedded mode step 4 customize the interface and behavior once you've followed the steps above, you should have an embedded momentscience unit on your site but it may not match your desired style guides (colors, etc) to better match your overall user experience, momentscience provides a convenient way to change these settings directly from the momentscience dashboard access customization options log in to the momentscience dashboard and navigate to the integrations section click on " js sdk" , then click " configure" adjust appearance and behavior use the dashboard settings to customize the look and feel of the momentscience unit to match your siteβs design guidelines step 5 change the number of ads and other properties modify display settings in the momentscience dashboard, go to the configuration section adjust the " number of ads" to control the number of offers to present at a time as needed without changing the code step 6 pass payload values for targeting, reporting, and personalization (optional) enhancing or optimizing your implementation of momentscience can be achieved by passing payload information when the momentscience unit is loaded this additional data allows the platform to target offers more effectively using payload values helps momentscience deliver more relevant offers to users, increasing the chances of conversion and overall yield improve reporting payload values can be utilized to segment and analyze performance across different dimensions, providing deeper insights into how various user groups interact with your offers personalize the moments experience by passing specific information about users, you can tailor the content and presentation of offers to better meet individual preferences and behaviors further recommendations to maximize the effectiveness and efficiency of your momentscience moments js sdk implementation, consider the following best practices and advanced techniques use macros to personalize your moments macros can be used to dynamically insert user specific data into your offers, enhancing personalization and relevance common macros include user names, order references, and purchase amounts utilize callback functions the moments js sdk supports callback functions that can be triggered at various points in the offer lifecycle this allows for greater control over user interactions and can be used to integrate with your internal tracking systems implement postbacks postbacks provide real time data on conversions related to your offers they are essential for tracking the effectiveness of your campaigns and optimizing them for better performance π’ if you're running into any issues while going through the integration process, feel free to contact us at help\@m omentscience com