Track In-Game Clicks on your Website
Use a postMessage to track in-game clicks directly from your website
You can configure clickable layers in your game to send a custom postMessage
back to your website. This allows you to track specific user interactions, like a prize claim, directly in your own analytics or to trigger other events on your site.
While a postMessage
can be applied to any clickable layer in the game, the following use case describes how to send a message when a user clicks on a prize.
Impact on Prize Redirects
When claiming a prize, your users will be redirected to the popup_redirect_url you configured in the Prizes tab. The only difference is that a custom message is also sent to your parent website.
To configure the postMessage
for a prize claim, do the following:
- Open the Editor in your game campaign.
- Select the button your user must click to claim the prize:
- In the Layout drop-down, select the screen that contains the prize claim option.
- Select the button the user must click to claim the prize.
The image below shows how to select a prize claim button in a Popup Win screen:

Selecting an example prize claim button
- In the Layers pane, right-click the button layer and then click Create Layer > Logic > Post Message
- Set the properties for the
postMessage
layer, by selecting the post message layer and entering the following details in the property pane:- Label Name: Enter a name for the
postmessage
layer. - Event and Event Name: Select NamedEvent from the event drop-down and then select popup_button_press as the event name. This ensures that an event is triggered when a player clicks the button.
- Mode: Select JSON or String, depending on the format of the data you need to send.
- Source: Select Custom to add your own value. In the text editor that appears, enter the message you want to receive.
- Label Name: Enter a name for the
- Save your changes in the Editor.
Updated 1 day ago