Mini-games on the landing pages

This feature is available by request only and must be activated by the Smartico Team. To request this feature, please submit a ticket at our Service Desk.

Mini-games can work on anonymous users coming to your landing pages before passing the registration process.

You can expose Loyalty Wheel, Scratch & Catch, or GiftBox games for visitors to your landing pages. After playing the game and completing registration, the user will get a prize according to the definition of the prize pool.

Important.

Smartico supports two modes to run mini-games for the anonymous users.

  1. Current page is explaining setup of the game in your main "retention" label with possibility to issue prizes after user completes registration

  2. Another approach is to setup games in the Acquisition label, where the prizes cannot be transferred after registration, but you are able to use Popups and Push notifications for the anonymous users.

Setting up the game template in Smartico BackOffice

You need to create a mini-game template for the Visitor mode and define the prize pool the same way as for the real users.

Game template in the Visitor mode

After creating a template, take a template ID and use it on the landing page as described below

Setting up Smartico scripts

Place the Smartico script on the landing page by adding the following code


<script>
(function(d, r, b, h, s){h=d.getElementsByTagName('head')[0];s = d.createElement('script');s.onload=b;s.src=r;h.appendChild(s);})
(document, 'https://libs.smartico.ai/smartico.js', function() {
    _smartico.initVisitorMode('_label_key_', { brand_key: '_brand_key_', lang: 'DE' });
});
</script>
  • Replace _label_key_ with the appropriate label key.

  • Replace _brand_key_ with the brand key relevant to your landing page.

  • Set lang to the 2-symbol ISO 639-1 language code.

Display the game on the landing page, add the following JavaScript to execute and show the game:

<script>
_smartico.showVisitorGame({ 
    template_id: 12345,
    onWin: function(prize) {
        window.location.href = 'https://my-casino.com/index.html?_smartico_visitor_win_uuid=' + prize.visitor_win_uuid;
    }
});
</script>

  • Set template_id to the ID of the mini-game template set up in the Smartico BackOffice

  • Define the onWin callback function and retain the value of prize.visitor_win_uuid, which should be passed to your main site after the user completes the registration

You can choose how to preserve the value and pass it to the main site, such as using cookies, passing it as a URL parameter, or saving it during the registration flow and retrieving it later on the main site.

Setting a position for the mini-game

By default, the mini-game is opened in the center of the screen as a modal overlay.

You can optionally position the mini-game to be in a specific place and to be part of the page instead of being modal.

For this, you need to define an iframe with the needed sizes and positions and instruct through the script to load the game in the position of this iframe.


<iframe style="width:300px;height:300px" id="myframe"></iframe>

<script>
_smartico.showVisitorGame({ 
    template_id: 12345,
    frame_id: 'myframe'
});
</script

Setting up Smartico scripts on the main site.

When the user completed registration and is redirected to the main site, you need to transfer visitor_win_uuid to the main site.

1st option is just to pass it as a query parameter to the main site. .e.g


 window.location.href = 
  'https://my-casino.com/index.html?_smartico_visitor_win_uuid='
  + prize.visitor_win_uuid;
                

2nd option, you are transferring the value in any way you prefer, but on the main site, you will need to set it in the global variable like this.

<script>
    window._smartico_visitor_win_uuid = '667018dc-b158-45b4-b52b-12f3a4a7175c';
</script>

Extended possibilities on the landing page

You can get more details about the won prize using the following code:

<script>
_smartico.showVisitorGame({ 
    template_id: 12345,
    onWin: function(prize) {
        console.log('Prize ID', prize.id);
        console.log('Prize name', prize.name);
        console.log('Win UUID', prize.visitor_win_uuid);
    }
});
</script>

You can prevent the user from playing the game until he completes some steps in the registration process:

<script>
var visitorEmail = undefined;

_smartico.showVisitorGame({ 
    template_id: 12345,
    onWin: function(prize) {
        console.log('Prize ID', prize.id);
        console.log('Prize name', prize.name);
        console.log('Win UUID', prize.visitor_win_uuid);
    },
    onBeforePlay: function() {
        if (!visitorEmail) {
            visitorEmail = prompt('Please enter your email', '');
            if (!visitorEmail) {
                return false;
            }
        }
        return true;
    },
})
</script>

The onBeforePlay callback should return true or false indicating if a visitor is allowed already to play the game or still need to pass some steps in the registration process.

Show the game immediately when a visitor opens the landing page

If you want to show the game right at the point when the landing page is opened, you should place the script in the proper order, as in the example.

<script>
(function(d, r, b, h, s){h=d.getElementsByTagName('head')[0];s = d.createElement('script');s.onload=b;s.src=r;h.appendChild(s);})
(document, 'https://libs.smartico.ai/smartico.js', function() {
    _smartico.initVisitorMode('_label_key_', { brand_key: '_brand_key_', lang: 'DE' });
    _smartico.showVisitorGame({ 
        template_id: 12345,
        frame_id: 'myframe'
    });
});
</script>

FAQ

Q: Does the Visitor mode require additional configurations?

A: Yes, the Visitor mode requires additional configurations that should be done by Customer Success Managers. If you have a multi-brand solution, this setup should be done for all brands associated with your landing pages.

Q: Is there abuse protection for multiple wins in the games engine?

A: Yes, the game's engine has abuse protection for multiple wins. Once a visitor plays a game on the landing page and receives a prize after registration, they won't receive additional prizes if they play the visitor game again.

Q: How much time does a user have to complete registration to receive the prize?

A: To receive the prize, the user should complete registration within 24 hours of playing the game.

Q: Can MatchX game run for the visitor?

A: MatchX is not supported in visitor mode. There is still a possibility to provide it for non-registered users, but it will require the creation of separate labels and more configurations. If you are interested, please contact your Customer Success Manager.

Q: How are items deducted from the prize pool?

A: The items in the prize pool are fixed and are not depleted when won by players.

Q: How do we prevent visitors from playing the game multiple times?

A: You can put a cookie or localStorage value in the user's browser in the onWin callback. Verify the value on the next visit, and don't show the mini-game if the value is set. Smartico doesn't have any logic that prevents the visitor from playing the game many times.

Q: Can we give multiple attempts for the visitor to play?

A: Smartico has no restrictions on how many times a specific visitor can play the game. If you want to apply limitations, it should be done using the custom logic of the operator defined on the landing page.

Q: What happens if existing users who registered a long time ago play in the visitor game and win the prize?

A: There is a protection that will not issue prizes to the players that are playing "visitor' games after they registered.

Last updated