On-site messages, also called real-time messages are HTML-formatted notifications delivered from campaigns directly to your website. They allow you to engage players instantly while they are logged in and active on your site.
⚠️ The Real-time Message channel is an add-on and must be activated before use. Contact the product team for further information.
How On-Site Messages Work
-
Triggering
-
Messages are created as part of a campaign.
-
When a campaign trigger fires, the message is placed in the delivery queue.
-
-
Delivery
-
If the player is currently online, the message is sent immediately and displayed on the website.
-
If the player is offline, the message remains in the queue until the player logs in again (subject to the TTL setting).
-
-
Time to Live (TTL)
-
Each real-time message is assigned a TTL (time to live) in days.
-
If the player does not log in before the TTL expires, the message is permanently deleted from the queue.
-
If the player logs in during the TTL window, the message is automatically delivered on-site.
-
Handling Multiple Messages
-
Players may receive messages from multiple campaigns.
-
In this case, the player can:
-
View messages one by one, or
-
Dismiss all notifications at once.
-
Technical Integration (via SDK)
-
Delivery is managed through the native JavaScript SDK.
-
The SDK:
-
Connects to the CRM real-time message servers.
-
Registers the player as online.
-
Receives and displays campaign messages instantly.
-
JS SDK
<script>var translations = {};</script>
<script defer src="https://cdn.web1.me/javascript/realtimesdk.js" data-menu-position="bottom-left" data-lang="sk" data-api-key="0000-0000-0000-0000"></script>Activating the Channel
To activate the real-time channel for a specific player:
- Ensure the JS SDK is correctly embedded.
- After the user signs in (authenticated), call the function below to associate a unique player identifier with the channel.
Aretonet.setPlayerId(playerId)
where playerId is your unique player identifier
Script data attributes
Below are the list of parameters available in the JS SDK. All fields are mandatory unless otherwise specified:
-
Attribute Description data-menu-position(string) position of message UI controls. Allowed values: 'bottom-left', 'bottom-right', 'top-left' or 'top-right'. data-lang(string, optional) language code. See translations. data-api-key(string) unique identifier. Contact product@aretonet.com to activate this product.
Label Translations
Any custom label translations can be altered by adding the below object to the script tag in the JS SDK code snippet. If data-lang attribute is not set, the default user browser language will be used for message UI controls. In case of missing translations, English will be used by default. If data-lang attribute is set, corresponding translations should be specified during integration:
var translations = {
"sk": { "Delete all messages": "Vymaz vsetky spravy", "Show next message": "Zobraz dalsiu spravu" }, "es": { "Delete all messages": "Eliminar todos los mensajes", "Show next message": "Mostrar siguiente mensaje"}⚠️ Currently supported translation keys: "Delete all messages" and "Show next message".
Styling the SDK
<style>
realtime-messaging {
--areto-color1: #26A69A;
--areto-color1-text: white;
--areto-color2: #FF6961;
--areto-color3: black;
}
</style>
✅ Suggested read: Creating a Real-Time Message
Help Center