---
title: "Track In-Game Clicks on your Website"
slug: "track-in-game-clicks-on-your-website"
updated: 2026-06-08T23:11:38Z
published: 2026-06-08T23:11:38Z
canonical: "docs.xtremepush.com/track-in-game-clicks-on-your-website"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xtremepush.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

> [!NOTE]
> 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:

1. Open the **Editor** in your game campaign.
2. Select the button your user must click to claim the prize:

![Selecting an example prize claim button](https://cdn.document360.io/b056e88b-f6c1-4bd2-b5b8-08e9336a17c9/Images/Documentation/3f76b860fb60197b80f16cbbd807e0bcc246ddd7309bd894cdcc8d26bcfb02ef-Screenshot_2025-08-25_at_11.28.40(3).png)

Selecting an example prize claim button
  1. In the **Layout** drop-down, select the screen that contains the prize claim option.
  2. 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:
3. In the **Layers** pane, right-click the button layer and then click **Create Layer** > **Logic** > **Post Message**
4. Set the properties for the `postMessage` layer, by selecting the post message layer and entering the following details in the property pane:
  1. **Label Name**: Enter a name for the `postmessage` layer.
  2. **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.
  3. **Mode**: Select **JSON** or **String**, depending on the format of the data you need to send.
  4. **Source**: Select **Custom** to add your own value. In the text editor that appears, enter the message you want to receive.
5. Save your changes in the Editor.
