View Product

When a user opens a product page in your web app, indicating their interest in a specific item.

Event trigger

  • Page loaded. The user viewed product details.

  • Add this script below the main script in the header tag.

<script>
  var url = web_media_template.buildUrlMediaJson(
    "product", 
    "view", 
    ["div_asm_qct_test_json_1"], 
    {
      items: [
        {
          type: "product",
          id: "12345",
          sku: "12345",
          barcode: "The Barcode",
          name: "The Product Title 1",
          original_price: 10000,
          price: 10000,
          brand: "The Brand Name",
          brand_country: "Viet Nam",
          main_category: "The main category name",
          category_level_1: "The sub category name level 1",
          category_level_2: "The sub category name level 2",
          page_url: "https://website.com/p.html",
          image_url: "https://website.com/p.png"
        }
      ]
    }
  );
</script>

Last updated