אפשר להגדיר אירועי מסחר אלקטרוני כדי לאסוף מידע על התנהגות הקנייה של המשתמשים. האירועים מאפשרים לכם לכמת את המוצרים הכי פופולריים שלכם ולראות את ההשפעה של המבצעים ושל מיקום המוצרים על ההכנסות.
במאמר הזה נסביר על כל אירוע של מסחר אלקטרוני ומתי צריך להגדיר את האירוע. לקבלת דוגמה מפורטת להגדרת אירוע מסחר אלקטרוני, ראו הגדרת אירוע purchase.
לפני שמתחילים
חשוב לוודא שהוספתם את Google Tag לאתר ושיש לכם גישה ל-Analytics ולקוד המקור של האתר.
המלצות
- מפעילים מצב ניפוי באגים כדי לראות אירועים בזמן אמת ולפתור בעיות בקלות
- צריך לבדוק את המגבלות על מאפיינים ומדדים מותאמים אישית כששולחים פרמטרים מותאמים אישית עם אירועי מסחר אלקטרוני
- צריך להגדיר את
currency
כששולחים נתוניvalue
(הכנסה) כדי להבטיח שמדדי ההכנסה מחושבים כראוי - מגדירים כל פרמטר מסחר אלקטרוני שיש לכם נתונים לגביו, גם אם הפרמטר הוא אופציונלי
- אפשר להשתמש באתר לדוגמה של מסחר אלקטרוני כדי לראות דוגמה לתיוג האתר
הטמעה
הטמעה טיפוסית של מסחר אלקטרוני מודדת כל אחת מהפעולות הבאות:
- בחירת פריט מתוך רשימה
- לצפייה בפרטי הפריט
- הוספה או הסרה של מוצר מעגלת קניות
- התחלת תהליך התשלום
- ביצוע רכישות או החזרים כספיים
- החלת מבצעים
בלב כל הפעולות האלה נמצאים המוצרים והשירותים שאתם מוכרים. אפשר להציג מוצרים ושירותים כמערך פריטים שניתן להוסיף לאירועי מסחר אלקטרוני. אפשר לכלול עד 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,
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,
quantity: 2
}
]
מעבר מהטמעה של מסחר אלקטרוני ב-UA
אם כבר הטמעתם מסחר אלקטרוני עבור Universal Analytics, תוכלו לבצע אחת מהפעולות הבאות כדי לעבור ל-Google Analytics 4:
- שימוש בהטמעת המסחר האלקטרוני ב-UA כדי לאכלס אירועי מסחר אלקטרוני ב-GA4
- החלפת הטמעת המסחר האלקטרוני ב-UA באירועי מסחר אלקטרוני ב-GA4
- שליחת נתוני מסחר אלקטרוני ל-Analytics דרך הטמעות של UA ו-GA4
למידע על העברת הטמעת המסחר האלקטרוני מ-Universal Analytics ל-Google Analytics 4, אפשר לעיין במדריך להעברת מסחר אלקטרוני ב-GA4 לגבי Google Tag.
בחירת פריט מתוך רשימה
כשמוצגת למשתמש רשימה של תוצאות, שולחים אירוע 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,
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,
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,
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,
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,
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,
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,
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,
quantity: 3
}
]
});
כשמשתמש ממשיך לשלב הבא בתהליך התשלום ומוסיף פרטי משלוח, צריך לשלוח אירוע add_shipping_info
. משתמשים בפרמטר shipping_tier
כדי לציין את אפשרות ההעברה של המשתמש, כמו Ground, "Air" או "Next-day". פרטים על הפרמטרים שצריך לשלוח מופיעים בחומר העזר בנושא אירועים.
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,
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,
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",
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,
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",
quantity: 2
}]
});
כדי למדוד החזרים כספיים, צריך לשלוח אירוע refund
עם transaction_id
הרלוונטי שצוין ופריט אחד או יותר שהוגדרו עם item_id
ו-quantity
. מומלץ לכלול פרטי פריט באירוע refund
כדי לראות מדדים של החזרים כספיים ברמת הפריט ב-Analytics.
פרטים על הפרמטרים שצריך לשלוח מופיעים בחומר העזר בנושא אירועים.
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,
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,
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,
quantity: 3
}
],
});