Description

The product page contains the details of a single product.

Before inserting this snippet, please make sure you have correctly set up the loader.

The viewItem event

Keeps track of a visit to a single item (product, property, etc.) Items can be provided in two ways:

  • by id only: if you have previous imported your products data feed into Transactionale
  • a full object with all the required details

If you provide the products by ID only, make sure you use the same ID as contained in the datafeed you provided.

    _trx.push({
      event: 'viewItem',
      itemID: 'ABC123'
    });
    
    // Example of full product specification
    _trx.push({
      event: 'viewItem',
      item: {
        id: 'ABC123', 
        price: '12.34', 
        name: 'Product name', 
        categoryId: 123, // Google merchant center category ID 
        categoryName: 'My Category', // Custom or Google category name
        barcode: '0000123456789'
      }
    });

Available Google Merchant categories: