Skip to main content
πŸŽ‰οΈ WEB Games Market Conference πŸ‘Ύ September 18, 2025 | details

Segments API

Integration of segments through SDK. Methods of operation.

List of methods​

Properties:

Checks:

Events:

Properties​

List of segments​

FREE

You have access to the entire list of segments at once when the game starts and the player loads, in the format of a string array.

gp.segments.list;

Example content:

[
'HAS_PAYMENTS',
'VIP',
'NEWBLE',
'VERY_ACTIVE'
]

Checks​

Segment check​

gp.segments.has(tag) FREE

// By Tag
const hasPayments = gp.segments.has('HAS_PAYMENTS');

// Check
if (hasPayments) {
// Player is in the HAS_PAYMENTS segment
}

Events​

Enter segment​

The callback returns the segment tag as a string:

gp.segments.on('enter', (segmentTag) => {
// player entered the segment
});

Leave segment​

The callback returns the segment tag as a string:

gp.segments.on('leave', (segmentTag) => {
// player left the segment
});

Stay in Touch​

Other documents of this chapter available Here. To get started, welcome to the Tutorials chapter.

GamePush Community Telegram: @gs_community.

For your suggestions e-mail: official@gamepush.com

We Wish you Success!