Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- event: 'view_item_list', // name of the event. In this case, it always must be view_item_list
- ecommerce: {
- items: [{ // an array where all currently viewed trips must be included
- item_name: 'Panoramski izlet brodom', // insert an actual trip name
- item_id: 'trip1', // insert an actual product ID
- price: '150.00', // insert an actual trip price. Number or a string. Don't include currency code
- item_category: 'Privatni izleti', // insert an actual product top-level category
- trip_location: 'Vrbnik', // insert an actual trip location
- item_list_name: 'Search results', // insert the name of the list where the trip is currently displayed
- item_list_id: 'search_results', // insert the list id where the product is currently displayed
- index: 1, // insert trip's position in that list
- quantity: '1' // trip quantity. In case of view_item_list, it will usually be equal to 1
- },{
- item_name: 'Plava špilja',
- item_id: 'trip2',
- price: '250.00',
- item_category: 'Privatni izleti',
- trip_location: 'Krk',
- item_list_name: 'Search results',
- item_list_id: 'search_results',
- index: 2,
- quantity: '1'
- }]
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment