▪️Activity: JS Code

Activity "JS Code" provides possibility to execute custom JavaScript code in the browser of the user that is online.

Important to note that in order to be executed, the user should be online on your side, so the activity should be triggered when you are confident that user is on site, for example you can use "Wait for event" with event "User went online", or product specific activities that are done on the web site, e.g. deposit, request for withdrawal, bet, etc.

You can also use "Delivery timeout", in order to overcome cases when user went offline for some period of time, by default 20 seconds. For example:

  • You build a campaign that is triggered on the first login during the day and is supposed to execute some JavaScript code.

  • There is a chance that right after login, the user is redirected to another page, which means that he was "offline" for a short period of time while navigating to another page.

  • Delivery timeout is supposed to handle such cases and deliver Popup to users on next time when he will be online within defined period

Some ideas of what you can do with "JS Code"

  • Use own JavaScript methods, for example trigger opening of the deposit page

  • Use 3rd party libraries APIs, e.g. trigger an event in the Google Analytics or start browser screen recording with HotJar or with Microsoft Clarity, or mark conversion with FaceBook AD API.

  • Use Smartico front-end API (extended integration) to trigger different actions, for example to change an avatar of user - _smartico.setAvatar("https://somesite.com/avatar.png");

  • Use Smartico front-end API to do any actions with gamification setup, for example register in the tournament when user does a deposit with code like _smartico.api.registerInTournament(12345) or opt-in user in the specific mission with code like _smartico.api.requestMissionOptIn(12345)

Last updated

Was this helpful?