Перейти к содержанию

Custom events examples for media

Этот контент еще не доступен на вашем языке.

Suggested events for media, 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.

Send this event when a user searches for any content in your app.

Recommended attributes:

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

Content read

Anchor link to

Trigger this event when a user has read a specific piece of content.

Recommended attributes:

  • category: String
  • article_id: String
  • author: String
  • published_date: Date
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Content read", {
"category": "string value",
"article_id": "string value",
"author": "string value",
"published_date": new Date()
});
});

Form submission

Anchor link to

Track submissions of your in-app forms (for example, Net Promoter Score), the choice of content preferences, and other surveys.

Recommended attributes:

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

Content shared

Anchor link to

Trigger this event when a user has shared a piece of content via social networks, email or other channels.

Recommended attributes:

  • category: String
  • article_id: String
  • author: String
  • published_date: Date
  • button_id: String
  • social_media: String
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Content shared", {
"category": "string value",
"article_id": "string value",
"author": "string value",
"published_date": new Date(),
"button_id": "string value",
"social_media": "string value"
});
});

Content preferences

Anchor link to

Fire this event when a user chooses a specific topic they are interested in.

Recommended attributes:

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