View difference between Paste ID: ArJ3gQKV and hckwmr8k
SHOW: | | - or go back to the newest paste.
1
window.dataLayer = window.dataLayer || [];
2-
window.dataLayer.push({ ecommerce: null });
2+
3
  event: 'purchase',  			// name of the event. In this case, it always must be purchase
4
  ecommerce: {
5
	currency: 'EUR',
6
    value: 250.00,						// total price of the trip
7-
    value: 29.98,						// order total (price of all products). If you want, it can be only price of all products
7+
8-
    tax: 3.00,							// tax
8+
    items: [{                           // an array with all products (that were in a cart when the checkout began)
9-
    shipping: 5.00,					// shipping costs
9+
      item_name: 'Blue Cave',           // insert an actual trip name
10
      item_id: 'trip1',             // insert an actual trip ID
11-
    coupon: 'ENDOFSUMMER',			// if coupon was applied to the order, include it here			
11+
      price: '250.00',                  // insert an actual trip price. Number or a string. Don't include currency code
12-
    items: [{							// an array with all products
12+
      item_category: 'Sea & Boat',          // insert an actual trip top-level category
13-
      item_name: 'Product 1', 			// insert an actual product name
13+
      product_type: 'Excursions and Tours', 	// in this case, always "Excursions and Tours"
14-
      item_id: 'product1',				// insert an actual product ID
14+
      trip_location: 'Krk',        // insert a trip location
15-
      price: 11.99,					   // insert an actual product price. Number or a string. Don't include currency code
15+
      booking_type: 'Reservation',		// booking type: Reservation or inquiry
16-
      affiliation: 'My online shop',	// affiliation (e.g. affiliate id, name of the store, etc.)
16+
	  country_address_section: 'Germany',				// country from the address section
17-
      item_brand: 'brand A',			// insert an actual product brand
17+
	  departure_date: '25.08.2023.',		// the date when the trip is booked
18-
      item_category: 'Apparel',			// insert an actual product top-level category
18+
      place_of_departure: 'Krk 10:00',		// place of departure and starting time (what is displayed in the dropdown menu)
19-
	  item_category2: 'T-shirt',		// if it is possible to drill down the categories (e.g. Apparel, then T-shirt, then Men), use item_category2, item_category3, etc. Can use from item_category up to item_category5
19+
	  number_of_adults: '4',		// number of adults 12+
20-
      item_variant: 'Blue',				// insert an actual product variant
20+
	  number_of_youth: '5',			// number of youth
21-
      quantity: 1,						// product quantity
21+
      number_of_children: '3',		// number of children
22-
	  item_coupon: 'SUMMER20'			// if a coupon was applied not to the entire order but to one product, use item_coupon
22+
      quantity: '1'                     // product quantity of how many trips were added to a wishlist, usually always 1
23-
    },{
23+
24-
      item_name: 'Product 2',
24+
25-
      item_id: 'product2',
25+