ई-कॉमर्स (GA4) डेवलपर गाइड

ई-कॉमर्स इवेंट सेट अप करके, अपने उपयोगकर्ताओं के व्यवहार के बारे में जानकारी इकट्ठा की जा सकती है. इवेंट की मदद से, सबसे लोकप्रिय प्रॉडक्ट का आकलन किया जा सकता है. साथ ही, रेवेन्यू पर प्रमोशन और प्रॉडक्ट प्लेसमेंट का असर भी देखा जा सकता है.

इस लेख में हर ई-कॉमर्स इवेंट के बारे में जानकारी दी गई है. साथ ही, यह भी बताया गया है कि इवेंट कब सेट अप करें. ई-कॉमर्स इवेंट सेट अप करने के सिलसिलेवार उदाहरण के लिए, खरीदारी इवेंट सेट अप करना लेख पढ़ें.

शुरू करने से पहले

पक्का करें कि आपने अपनी वेबसाइट में Google टैग जोड़ा हो. साथ ही, आपके पास Analytics और वेबसाइट के सोर्स कोड का ऐक्सेस हो.

सुझाव

  • डीबग मोड चालू करें. इससे रीयल टाइम में इवेंट देखे जा सकते हैं और समस्याओं को आसानी से हल किया जा सकता है
  • ई-कॉमर्स इवेंट से कस्टम पैरामीटर भेजते समय, कस्टम डाइमेंशन और मेट्रिक की सीमाओं की समीक्षा करें
  • यह पक्का करने के लिए कि रेवेन्यू की मेट्रिक सही तरीके से कैलकुलेट की जाएं, value (आय) का डेटा भेजते समय currency सेट करें
  • हर उस ई-कॉमर्स पैरामीटर को सेट करें जिसके लिए आपके पास डेटा है, चाहे पैरामीटर वैकल्पिक हो या नहीं
  • ई-कॉमर्स वेबसाइट का सैंपल इस्तेमाल करके, वेबसाइट को टैग करने के तरीके का उदाहरण देखें

लागू करने का तरीका

ई-कॉमर्स लागू करने के दौरान, इनमें से किसी भी कार्रवाई को मेज़र किया जाता है:

इन कार्रवाइयों में, आपके बेचे जाने वाले प्रॉडक्ट और सेवाओं की अहम जानकारी होती है. प्रॉडक्ट और सेवाओं को उन आइटम की कैटगरी के तौर पर दिखाया जा सकता है जिन्हें ई-कॉमर्स इवेंट में जोड़ा जा सकता है. आपके पास आइटम कलेक्शन में दिए गए पैरामीटर के साथ-साथ, ज़्यादा से ज़्यादा 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
    }
]

सूची से कोई आइटम चुनें

जब किसी उपयोगकर्ता को नतीजों की सूची दी जाती है, तब दिखाए गए आइटम वाले items कलेक्शन पैरामीटर के साथ view_item_list इवेंट भेजें. भेजे जाने वाले पैरामीटर के बारे में जानकारी पाने के लिए, इवेंट रेफ़रंस देखें.

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

जब कोई उपयोगकर्ता सूची से कोई आइटम चुनता है, तो items कलेक्शन पैरामीटर में, चुने गए आइटम के साथ select_item इवेंट भेजें. भेजे जाने वाले पैरामीटर के बारे में जानकारी पाने के लिए, इवेंट रेफ़रंस देखें.

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

शॉपिंग कार्ट में कोई आइटम जोड़ना या हटाना

items कलेक्शन में, काम के आइटम के साथ add_to_cart इवेंट भेजकर, शॉपिंग कार्ट में जोड़े जा रहे आइटम को मेज़र करें. भेजे जाने वाले पैरामीटर के बारे में जानकारी पाने के लिए, इवेंट रेफ़रंस देखें.

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

आपके पास यह मेज़र करने का विकल्प भी है कि किसी आइटम को विशलिस्ट में कब जोड़ा गया. इसके लिए, items कलेक्शन में, काम के आइटम के साथ add_to_wishlist इवेंट भेजें. भेजे जाने वाले पैरामीटर के बारे में जानकारी पाने के लिए, इवेंट रेफ़रंस देखें.

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 पैरामीटर का इस्तेमाल करें. जैसे, "ग्राउंड", "एयर" या "अगले दिन". भेजे जाने वाले पैरामीटर के बारे में जानकारी पाने के लिए, इवेंट के बारे में जानकारी देखें.

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 में तय किए गए एक या एक से ज़्यादा आइटम भेजें. हमारा सुझाव है कि Analytics में आइटम-लेवल की रिफ़ंड मेट्रिक देखने के लिए, आप अपने refund इवेंट में आइटम की जानकारी शामिल करें.

भेजे जाने वाले पैरामीटर के बारे में जानकारी पाने के लिए, इवेंट के बारे में जानकारी देखें.

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
    }
  ],
});