Integrating Snappysas into your application using javascript is the quickiest and easiest approach. Just follow these easy steps:
Your API key uniquely indentifies your account and application.
This snippet allows Snappysas to deliver in-app messages into your application.
<script> var snappysas = snappysas || {}; snappysas.apiKey = '[[API-KEY-PLACEHOLDER]]'; snappysas.includeCss = false; snappysas.user = { 'id': '[[USER-ID-PLACEHOLDER]]', 'name': '[[NAME-PLACEHOLDER]]', 'user-time': '[[USER-TIME-PLACEHOLDER]]' }; </script> <script src='https://api.snappysas.com/js/message-feed.js'></script>It should be added as the last item (or as close as possible) in the
<BODY>
element and it should appear on each page that you want users to be able to view their message feed.[[API-KEY-PLACEHOLDER]]
placeholder with the API key you previously obtained.These user attributes should be dynamically populated for each user who uses your application. They provide context about the user, which will eventually be used for your targeted messaging campaigns.
[[USER-ID-PLACEHOLDER]]
placeholder with an ID that will uniquely identify the current user. This ID must remain the same forever and no two users can have the same ID. SECURITY TIP: read the best practices security considerations to select a safe ID.[[NAME-PLACEHOLDER]]
placeholder with the user's real name. This field is not required, but is highly recommended (you should remove the attribute from the snippet if you choose not to use it).[[USER-TIME-PLACEHOLDER]]
placeholder with the user's local time. This field is not required, but is highly recommended (you should remove the attribute from the snippet if you choose not to use it).snappysas.user
property which provide additional context for your campaign targeting purposes. TIP: check out the best practices for choosing the right attributes.