For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

▪️Callbacks and pausing messages

Use these calls of the Smartico script to pause popups, inbox messages, mini-games and forms on sensitive pages, to listen to script callbacks, and to ask the player for push permissions.

Suspending online creatives

Popups, inbox messages, forms, and mini-games can be suspended in some cases. Usually, it's done on the screens where the user shouldn't be interrupted from the main process, e.g., on the Deposit page or while completing a KYC form.

// Disabling popups
 _smartico.suspendPopups(true);
// Enabling popups
 _smartico.suspendPopups(false);
 // Disabling inbox messages
 _smartico.suspendInbox(true);
// Enabling inbox messages
 _smartico.suspendInbox(false);
// Disabling mini-games that are triggered by server
 _smartico.suspendMiniGames(true);
// Enabling mini-games that are triggered by server
 _smartico.suspendMiniGames(false);
// Disabling Forms
 _smartico.suspendForms(true);
// Enabling Forms
 _smartico.suspendForms(false);

After disabling suspension, the popups, inbox messages and mini-games that were missed will be shown to the end-user if the client session remains active (the user didn't refresh the page or didn't navigate between pages). Missed forms are shown one at a time: the next one after the user closes the previous one. The suspension ends when the user logs out. Call these methods after you set window._smartico_user_id: without a user ID they print an error and do nothing.

Right after the user is identified, the Smartico script also holds popups, inbox messages, Prize Drop and Jackpot win popups, deep links and JS code activities for a short time. They are shown only when the time set in the Delay for online messages right after login, ms setting in Label settings has passed since the identification (1000 ms by default; 0 means no delay). Use it when your site reloads the page right after login, so that messages are not shown and then lost on the reload.

Smartico callbacks

Listening of interaction in the Gamification Widget

You can use code below to get JavaScript callbacks, whenever user is navigating to different screens and modals inside the gamification widget

For example you can get notified when user opens missions modal with specific id.

All the interactions are also recorded in Smartico Data Warehouse, so you can get historical interactions for later analysis.

For the semantic of parameters and possible values, please refer to this explanation on Data Warehouse page.

Requesting push permissions

You can directly call the Smartico script to trigger the browsers' native dialog for push permissions.

This can be done for the already identified user or an anonymous (visitor). For a visitor, the script runs in Visitor mode (or in Acquisition mode, which also gives the visitor an ID).

The push permissions token will be registered automatically on the Smartico side when the user is identified.

It's also possible to build marketing (acquisition) campaigns., gamification, and communication for anonymous users (visitors), please get in touch with your Smartico Customer Success Manager to make the needed setup and provide training.

Frequently Asked Questions (FAQ)

Does suspending mini-games also suspend Prize Drop and Jackpot win celebrations?

Yes. Calling _smartico.suspendMiniGames(true) suspends standard mini-games as well as server-triggered Prize Drop and Jackpot win popups. While suspended, incoming win notifications are held in memory and will automatically display when mini-games are re-enabled, as long as the user session remains active.

Last updated

Was this helpful?