يمكنك إعداد أحداث التجارة الإلكترونية لجمع معلومات عن سلوك التسوّق لدى مستخدِميك. تسمح لك هذه الأحداث بتحديد المنتجات الأكثر رواجًا ومعرفة مدى تأثر الإيرادات بالعروض الترويجية وتضمين المنتجات لأغراض ترويجية.
يوضّح هذا المستند كلّ حدث من أحداث التجارة الإلكترونية والحالات التي يجب فيها إعداد الحدث. للحصول على مثال تفصيلي حول كيفية إعداد حدث تجارة إلكترونية، اطّلِع على مقالة إعداد حدث شراء.
قبل البدء
تأكَّد من أنّك أضفت علامة Google إلى موقعك الإلكتروني ويمكنك الوصول إلى "إحصاءات Google" ورمز المصدر للموقع الإلكتروني.
الاقتراحات
- فعِّل وضع تصحيح الأخطاء لتتمكّن من الاطّلاع على الأحداث في الوقت الفعلي وتحديد المشاكل وحلّها.
- راجِع حدود السمات والمقاييس المخصّصة عند إرسال مَعلمات مخصّصة مع أحداث التجارة الإلكترونية.
- اضبط
currencyعند إرسال بياناتvalue(الإيرادات) لضمان احتساب مقاييس الإيرادات بشكل صحيح. - اضبط كل مَعلمة من مَعلمات التجارة الإلكترونية التي تتوفّر لديك بيانات بشأنها، بغض النظر عمّا إذا كانت المَعلمة اختيارية.
- استخدِم الموقع الإلكتروني النموذجي للتجارة الإلكترونية للاطّلاع على مثال حول كيفية وضع علامات على موقعك الإلكتروني.
- لضمان ملء البيانات بشكل صحيح في التقارير، اتّبِع التنسيق الوارد في هذا المستند. إذا كنت بحاجة إلى ضبط مصفوفة المنتجات خارج مصفوفة التجارة الإلكترونية، اضبط المَعلمة
currencyعلى مستوى الحدث عند إرسال بياناتvalue(الأرباح).
إعداد تجديد النشاط التسويقي الديناميكي في "إعلانات Google"
تسمح لك ميزة تجديد النشاط التسويقي الديناميكي بأن تعرض على مستخدِمي موقعك الإلكتروني وتطبيقك إعلانات ذات صلة بالمنتجات والخدمات المعيَّنة التي شاهدوها. تشمل المزايا الأخرى ما يلي:
- التنفيذ البسيط: لست بحاجة إلى ربط المَعلمات يدويًا بين موقعك الإلكتروني و"إعلانات Google".
- الإعداد المستند إلى الأحداث: لتفعيل ميزة تجديد النشاط التسويقي الديناميكي، نفِّذ الأحداث المقترَحة لنوع نشاطك التجاري. مزيد من المعلومات عن أحداث تجديد النشاط التسويقي الديناميكي ومَعلماته
التنفيذ
تقيس عملية تنفيذ التجارة الإلكترونية النموذجية أيًا من الإجراءات التالية:
- اختيار عنصر من قائمة
- عرض تفاصيل المنتج
- إضافة منتج إلى سلة التسوّق أو إزالته منها
- بدء عملية الدفع
- إجراء عمليات شراء أو ردّ الأموال
- تطبيق العروض الترويجية
وتستند هذه الإجراءات إلى المنتجات والخدمات التي تبيعها. يمكنك تمثيل المنتجات والخدمات كمصفوفة من السلع التي يمكن إضافتها إلى أحداث التجارة الإلكترونية. يمكنك تضمين ما يصل إلى 27 مَعلمة مخصّصة في مصفوفة المنتجات أو الخدمات، بالإضافة إلى المَعلمات المحدّدة.
يوضّح المثال التالي كيفية إنشاء مجموعة items التي تتم الإشارة إليها في هذا الدليل. يمكن أن تتضمّن مصفوفة items ما يصل إلى 200 عنصر.
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 10.01,
google_business_vertical: "retail",
quantity: 3
},
{
item_id: "SKU_12346",
item_name: "Google Grey Women's Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 3.33,
index: 1,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "gray",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 21.01,
google_business_vertical: "retail",
quantity: 2
}
]
اختيار عنصر من قائمة
عندما تظهر للمستخدم قائمة بالنتائج، أرسِل حدث view_item_list يتضمّن مَعلمة مصفوفة items تحتوي على العناصر المعروضة. للحصول على تفاصيل حول المَعلمات التي يجب إرسالها، اطّلِع على مرجع الأحداث.
gtag("event", "view_item_list", {
item_list_id: "related_products",
item_list_name: "Related products",
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 10.01,
google_business_vertical: "retail",
quantity: 3
}
]
});
بعد أن يختار المستخدم سلعة من القائمة، أرسِل الحدث select_item مع السلعة المحدّدة في مَعلمة مصفوفة items. للاطّلاع على تفاصيل حول المَعلمات التي يجب إرسالها، راجِع مرجع الأحداث.
gtag("event", "select_item", {
item_list_id: "related_products",
item_list_name: "Related products",
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 10.01,
google_business_vertical: "retail",
quantity: 3
}
]
});
عرض تفاصيل السلعة
لقياس عدد المرّات التي يتم فيها عرض تفاصيل السلعة، أرسِل حدث view_item كلما شاهد المستخدم شاشة تفاصيل السلعة. للاطّلاع على تفاصيل حول المَعلمات التي يجب إرسالها، راجِع مرجع الأحداث.
gtag("event", "view_item", {
currency: "USD",
value: 30.03,
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 10.01,
google_business_vertical: "retail",
quantity: 3
}
]
});
إضافة سلعة إلى سلة تسوّق أو إزالتها منها
يمكنك قياس إضافة سلعة إلى سلّة التسوّق من خلال إرسال حدث add_to_cart مع السلع ذات الصلة في مصفوفة items. للاطّلاع على تفاصيل حول المَعلمات التي يجب إرسالها، راجِع مرجع الأحداث.
gtag("event", "add_to_cart", {
currency: "USD",
value: 30.03,
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 10.01,
google_business_vertical: "retail",
quantity: 3
}
]
});
يمكنك أيضًا قياس عدد المرات التي تتم فيها إضافة منتج إلى قائمة الأمنيات من خلال إرسال الحدث add_to_wishlist مع المنتجات ذات الصلة في مصفوفة items. للحصول على تفاصيل حول المَعلمات التي يجب إرسالها، اطّلِع على مرجع الأحداث.
gtag("event", "add_to_wishlist", {
currency: "USD",
value: 30.03,
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 10.01,
google_business_vertical: "retail",
quantity: 3
}
],
});
عندما يعرض المستخدم سلة التسوّق لاحقًا، أرسِل الحدث view_cart مع جميع السلع في سلة التسوّق. للحصول على تفاصيل حول المَعلمات التي يجب إرسالها، اطّلِع على مرجع الأحداث.
gtag("event", "view_cart", {
currency: "USD",
value: 30.03,
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 10.01,
google_business_vertical: "retail",
quantity: 3
}
]
});
لقياس الوقت الذي يزيل فيه المستخدم سلعة من سلة التسوق، أرسِل الحدث remove_from_cart. للحصول على تفاصيل حول المَعلمات التي يجب إرسالها، اطّلِع على مرجع الأحداث.
gtag("event", "remove_from_cart", {
currency: "USD",
value: 30.03,
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 10.01,
google_business_vertical: "retail",
quantity: 3
}
]
});
بدء عملية الدفع
يمكنك قياس الخطوة الأولى في عملية الدفع من خلال إرسال حدث begin_checkout مع سلعة واحدة أو أكثر محدّدة بالحقول ذات الصلة. يمكن أيضًا إضافة قسيمة في هذه المرحلة إلى الطلب بأكمله من خلال إضافتها إلى الحدث أو تطبيقها على سلعة معيّنة من خلال إضافتها إلى عناصر محدّدة في مصفوفة items. للاطّلاع على تفاصيل حول المَعلمات التي يجب إرسالها، راجِع مرجع الأحداث.
gtag("event", "begin_checkout", {
currency: "USD",
value: 30.03,
coupon: "SUMMER_FUN",
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 10.01,
google_business_vertical: "retail",
quantity: 3
}
]
});
عندما ينتقل المستخدم إلى الخطوة التالية في عملية الدفع ويضيف معلومات الشحن، أرسِل الحدث add_shipping_info. استخدِم المَعلمة
shipping_tier لتحديد خيار التسليم الذي يختاره المستخدِم، مثل "بري" أو "جوي" أو "في اليوم التالي". للحصول على تفاصيل حول المَعلمات التي يجب إرسالها، اطّلِع على مرجع الأحداث.
gtag("event", "add_shipping_info", {
currency: "USD",
value: 30.03,
coupon: "SUMMER_FUN",
shipping_tier: "Ground",
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 10.01,
google_business_vertical: "retail",
quantity: 3
}
]
});
أرسِل الحدث add_payment_info عندما يُرسِل مستخدم معلومات الدفع.
إذا كان ذلك منطبقًا، أدرِج payment_type مع هذا الحدث لطريقة الدفع المحدّدة. للحصول على تفاصيل حول المَعلمات التي يجب إرسالها، اطّلِع على مرجع الأحداث.
gtag("event", "add_payment_info", {
currency: "USD",
value: 30.03,
coupon: "SUMMER_FUN",
payment_type: "Credit Card",
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 10.01,
google_business_vertical: "retail",
quantity: 3
}
]
});
إجراء عملية شراء أو ردّ الأموال
يمكنك قياس عملية شراء من خلال إرسال حدث purchase يتضمّن سلعة واحدة أو أكثر محدّدة بالحقول ذات الصلة. للحصول على تفاصيل حول المَعلمات التي يجب إرسالها، اطّلِع على مرجع الأحداث.
gtag("event", "purchase", {
transaction_id: "T_12345",
// Sum of (price * quantity) for all items.
value: 72.05,
tax: 3.60,
shipping: 5.99,
currency: "USD",
coupon: "SUMMER_SALE",
customer_type: "new",
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 10.01,
google_business_vertical: "retail",
quantity: 3
},
{
item_id: "SKU_12346",
item_name: "Google Grey Women's Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 3.33,
index: 1,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "gray",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 21.01,
promotion_id: "P_12345",
promotion_name: "Summer Sale",
google_business_vertical: "retail",
quantity: 2
}]
});
يمكنك قياس عمليات ردّ الأموال عن طريق إرسال حدث refund مع تحديد transaction_id المناسب وعنصر واحد أو أكثر باستخدام item_id وquantity. ننصحك بتضمين معلومات المنتجات في حدث refund للاطّلاع على مقاييس المبالغ المستردّة على مستوى المنتج في "إحصاءات Google".
للحصول على تفاصيل حول المَعلمات التي يجب إرسالها، اطّلِع على مرجع الأحداث.
gtag("event", "refund", {
currency: "USD",
transaction_id: "T_12345", // Transaction ID. Required for purchases and refunds.
value: 30.03,
coupon: "SUMMER_FUN",
shipping: 3.33,
tax: 1.11,
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 10.01,
google_business_vertical: "retail",
quantity: 3
}
]
});
تطبيق العروض الترويجية
تتضمّن التجارة الإلكترونية إمكانية قياس مرّات الظهور والنقرات على العروض الترويجية الداخلية، مثل البانرات المعروضة للترويج لتخفيضات.
يتم عادةً قياس مرّات ظهور العروض الترويجية من خلال عرض الشاشة الأوّلي عن طريق إرسال الحدث view_promotion مع مَعلمة سلع لتحديد السلعة المُروَّج لها. للحصول على تفاصيل حول المَعلمات التي يجب إرسالها، اطّلِع على مرجع الأحداث.
gtag("event", "view_promotion", {
creative_name: "Summer Banner",
creative_slot: "featured_app_1",
promotion_id: "P_12345",
promotion_name: "Summer Sale",
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 10.01,
google_business_vertical: "retail",
quantity: 3
}
]
});
للإشارة إلى أنّ مستخدمًا نقر على عرض ترويجي، أرسِل الحدث select_promotion مع تلك السلعة كمَعلمة سلعة. للحصول على تفاصيل حول المَعلمات التي يجب إرسالها، اطّلِع على مرجع الأحداث.
gtag("event", "select_promotion", {
creative_name: "Summer Banner",
creative_slot: "featured_app_1",
promotion_id: "P_12345",
promotion_name: "Summer Sale",
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 10.01,
google_business_vertical: "retail",
quantity: 3
}
],
});