انتقل إلى المحتوى

أمثلة على الأحداث المخصصة

أدناه، ستجد مجموعة من الأحداث داخل التطبيق الموصى بها لفئات التطبيقات المختلفة.

لتنفيذ أي من هذه الأحداث أو غيرها:

  • أنشئ حدثًا في لوحة تحكم Pushwoosh الخاصة بك وأضف السمات إذا لزم الأمر؛
  • ادمج طريقة postEvent في مشروع هاتفك المحمول، مع توفير اسم الحدث وسماته تمامًا كما هي في لوحة التحكم.
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Event name", { // event name exactly as in Control Panel
"attribute 1": "string value", // attribute name and type exactly as in Control Panel
"attribute 2": "string value" // attribute name and type exactly as in Control Panel
});
});

تطبيقات الجوال

Anchor link to

تسجيل الخروج

Anchor link to

قم بتشغيل هذا الحدث عندما يقوم المستخدمون بتسجيل الخروج من حساباتهم في تطبيقك.

السمات الموصى بها:

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

تمت إضافة طريقة الدفع

Anchor link to

أطلق هذا الحدث عندما يضيف مستخدم طريقة دفع إلى حسابه في تطبيقك، على سبيل المثال، يقدم بيانات البطاقة أو يربط الحساب بنظام دفع.

السمات الموصى بها:

  • payment_method: 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("Payment method added", {
"user_id": "string value",
"payment_method": "string value"
});
});

تم تغيير طريقة الدفع

Anchor link to

أرسل هذا الحدث عندما يقوم مستخدم بتحديث طريقة الدفع الخاصة به في التطبيق.

السمات الموصى بها:

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

تم النقر على الزر

Anchor link to

تتبع نقرات الأزرار داخل التطبيق باستخدام هذا الحدث لتحسين تحليلاتك، واختبار استراتيجيات الاتصال المختلفة، وزيادة صلة رسائلك بناءً على سلوك العملاء.

سمات الحدث الموصى بها:

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

تم تحديث التطبيق

Anchor link to

قم بتشغيل هذا الحدث في كل مرة يقوم فيها المستخدم بتثبيت إصدار محدث من تطبيقك.

السمات الموصى بها:

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

تم تحديث نظام التشغيل

Anchor link to

أطلق هذا الحدث عندما يقوم مستخدم بتحديث إصدار نظام التشغيل على جهازه لضمان توافق تطبيقك بالكامل.

السمات الموصى بها:

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

التجارة الإلكترونية

Anchor link to

تمت إضافة المنتج إلى عربة التسوق

Anchor link to

أطلق هذا الحدث بمجرد أن يضيف المستخدم منتجًا إلى عربة التسوق الخاصة به لبناء حملات العربة المتروكة، أو تعيين علامات المستخدم، أو تحليل كفاءة عروضك الترويجية.

السمات الموصى بها:

  • product_id: String
  • price: Integer
  • source: String
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Product added to cart", {
"product_id": "string value",
"price": 1,
"source": "string value"
});
});

شراء مخفض

Anchor link to

قم بتشغيل هذا الحدث بمجرد أن يشتري المستخدم أي منتج باستخدام قسيمة خصم.

السمات الموصى بها:

  • product_id: String
  • coupon_id: String
  • price: Integer
  • discount: String
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Discounted purchase", {
"product_id": "string value",
"coupon_id": "string value",
"price": 1,
"discount": "string value"
});
});

تم التخلي عن صفحة المنتج

Anchor link to

أطلق هذا الحدث عندما يغادر المستخدم صفحة منتج دون إجراء تحويل.

السمات الموصى بها:

  • product_id: String
  • price: Integer
  • source: String
  • product_page_id: String
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Product Page abandoned", {
"product_id": "string value",
"price": 1,
"source": "string value",
"product_page_id": "string value"
});
});

تمت إضافة المنتج إلى قائمة الرغبات

Anchor link to

ابق على اطلاع بالمنتجات التي حفظها المستخدمون في قوائم رغباتهم وأنشئ عروضًا شخصية وحملات ترويجية.

السمات الموصى بها:

  • product_id: String
  • wishlist_id: String
  • product_price: Integer
  • source: 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("Product added to wishlist", {
"product_id": "string value",
"currency": "string value",
"price": 1,
"source": "string value",
"user_id": "string value"
});
});

تمت إزالة المنتج من قائمة الرغبات

Anchor link to

أطلق هذا الحدث عندما يحذف مستخدم منتجًا من قائمة رغباته.

السمات الموصى بها:

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

فئة المنتج

Anchor link to

أرسل هذا الحدث عندما يشتري مستخدم منتجًا من فئة معينة.

السمات الموصى بها:

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

أول عملية شراء

Anchor link to

قم بتشغيل هذا الحدث بمجرد أن يقوم المستخدم بأول عملية شراء له.

السمات الموصى بها:

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

تطبيقات الألعاب

Anchor link to

مستوى جديد

Anchor link to

عندما يصل المستخدم إلى مستوى جديد في اللعبة، قم بتشغيل حدث “مستوى جديد”.

السمات الموصى بها:

  • 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"
});
});

تم إكمال المستوى

Anchor link to

أرسل هذا الحدث عندما يكمل مستخدم مستوى معينًا في اللعبة.

السمات الموصى بها:

  • 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"
});
});

تم كسب عملة افتراضية

Anchor link to

أطلق هذا الحدث عندما يتم تعبئة رصيد العملة الافتراضية للمستخدم.

السمات الموصى بها:

  • 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"
});
});

تم إكمال البرنامج التعليمي

Anchor link to

قم بتشغيل هذا الحدث عندما يكمل المستخدم البرنامج التعليمي داخل اللعبة.

السمات الموصى بها:

  • 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
});
});

تم فتح إنجاز

Anchor link to

راقب تفاعل المستخدم مع الحدث الذي يتم إطلاقه عندما يفتح المستخدم إنجازًا معينًا.

السمات الموصى بها:

  • 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"
});
});

إدارة الاشتراكات

Anchor link to

شراء اشتراك مدفوع

Anchor link to

أرسل هذا الحدث عندما يشتري مستخدم خطة اشتراك مدفوعة.

السمات الموصى بها:

  • subscription_plan_name: String
  • price: Integer
  • currency:String
  • expiry_date:Date
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Paid subscription purchase", {
"subscription_plan_name": "string value",
"price": 1,
"currency": "string value",
"expiry_date": "new Date()"
});
});

تجديد الاشتراك

Anchor link to

قم بتشغيل هذا الحدث بمجرد أن يجدد المستخدم خطة اشتراكه.

السمات الموصى بها:

  • subscription_plan_name: String
  • price: Integer
  • currency: String
  • renewal_count: Integer
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Subscription renewal", {
"subscription_plan_name": "string value",
"price": 1,
"currency": "string value",
"renewal_count": 1
});
});

بدأت الفترة التجريبية المجانية

Anchor link to

قم بتشغيل هذا الحدث عندما يختار المستخدم بدء فترة تجريبية مجانية قبل الحصول على اشتراك.

السمات الموصى بها:

  • free_trial_name: String
  • expiry_date: Date
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Free trial started", {
"free_trial_name": "string value",
"expiry_date": "new Date()"
});
});

تم إلغاء الاشتراك

Anchor link to

استخدم هذا الحدث لتتبع إلغاءات الاشتراك داخل التطبيق.

// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Subscription cancelled");
});

التحويل من مجاني إلى مدفوع

Anchor link to

قم بتشغيل هذا الحدث بمجرد أن يتحول المستخدم من استخدام تطبيقك مجانًا إلى خطة اشتراك مدفوعة.

السمات الموصى بها:

  • subscription_plan_name: String
  • price: Integer
  • currency: String
  • date: Date
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Conversion from Free to Paid", {
"subscription_plan_name": "string value",
"price": 1,
"currency": "string value",
"date": "new Date()"
});
});

الوسائط

Anchor link to

أرسل هذا الحدث عندما يبحث مستخدم عن أي محتوى في تطبيقك.

السمات الموصى بها:

  • 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"
});
});

تمت قراءة المحتوى

Anchor link to

قم بتشغيل هذا الحدث عندما يقرأ المستخدم جزءًا معينًا من المحتوى.

السمات الموصى بها:

  • 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()"
});
});

إرسال النموذج

Anchor link to

تتبع عمليات إرسال النماذج داخل التطبيق (على سبيل المثال، صافي نقاط الترويج)، واختيار تفضيلات المحتوى، والاستطلاعات الأخرى.

السمات الموصى بها:

  • 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"
});
});

تمت مشاركة المحتوى

Anchor link to

قم بتشغيل هذا الحدث عندما يشارك مستخدم جزءًا من المحتوى عبر الشبكات الاجتماعية أو البريد الإلكتروني أو قنوات أخرى.

السمات الموصى بها:

  • 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"
});
});

تفضيلات المحتوى

Anchor link to

أطلق هذا الحدث عندما يختار المستخدم موضوعًا معينًا يهتم به.

السمات الموصى بها:

  • 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"
});
});