SandroBabic

GA4 EC - Mare Tours - purchase

Aug 19th, 2023
954
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. window.dataLayer = window.dataLayer || [];
  2. window.dataLayer.push({
  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.     transaction_id: 'abc123',           // transaction id
  8.     items: [{                           // an array with all products (that were in a cart when the checkout began)
  9.       item_name: 'Blue Cave',           // insert an actual trip name
  10.       item_id: 'trip1',             // insert an actual trip ID
  11.       price: '250.00',                  // insert an actual trip price. Number or a string. Don't include currency code
  12.       item_category: 'Sea & Boat',          // insert an actual trip top-level category
  13.       product_type: 'Excursions and Tours',     // in this case, always "Excursions and Tours"
  14.       trip_location: 'Krk',        // insert a trip location
  15.       booking_type: 'Reservation',      // booking type: Reservation or inquiry
  16.       country_address_section: 'Germany',               // country from the address section
  17.       departure_date: '25.08.2023.',        // the date when the trip is booked
  18.       place_of_departure: 'Krk 10:00',      // place of departure and starting time (what is displayed in the dropdown menu)
  19.       number_of_adults: '4',        // number of adults 12+
  20.       number_of_youth: '5',         // number of youth
  21.       number_of_children: '3',      // number of children
  22.       quantity: '1'                     // product quantity of how many trips were added to a wishlist, usually always 1
  23.     }]
  24.   }
  25. });
Advertisement
Add Comment
Please, Sign In to add comment