বিষয়বস্তুতে যান

Custom events examples for gaming apps

এই বিষয়বস্তু এখনও আপনার ভাষায় উপলব্ধ নয়।

Suggested events for gaming apps, each with recommended attributes and code samples. To send an event from your app, see Send custom events from your app. To use these events in segments and journeys, see industry playbooks.

When a user reaches a new game level, trigger the New level event.

Recommended attributes:

  • level_id: String
  • user_id: String
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("New level", {
"level_id": "string value",
"user_id": "string value"
});
});

Level completed

Anchor link to

Send this event when a user completes a particular game level.

Recommended attributes:

  • level_id: String
  • user_id: String
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Level completed", {
"level_id": "string value",
"user_id": "string value"
});
});

Virtual currency earned

Anchor link to

Fire this event when a user’s virtual currency balance tops up.

Recommended attributes:

  • currency_name: String
  • quantity: Integer
  • user_id: String
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Virtual currency earned", {
"currency_name": "string value",
"quantity": 1,
"user_id": "string value"
});
});

Tutorial completed

Anchor link to

Trigger this event when a user completes the in-game tutorial.

Recommended attributes:

  • tutorial_name: String
  • completion: Boolean
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Tutorial completed", {
"tutorial_name": "string value",
"completion": true
});
});

Achievement unlocked

Anchor link to

Monitor user engagement with the event fired when a user unlocks a specific achievement.

Recommended attributes:

  • achievement_name: String
  • level: Integer
  • user_id: String
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Achievement unlocked", {
"achievement_name": "string value",
"level": 5,
"user_id": "string value"
});
});