Open Nayuken opened 1 month ago
CRP Relevance - the code below has been updated for the CRP flow. This event should fire when the enrollment page loads - fire the event to the dataLayer AFTER the page load completed event.
window.dataLayer = window.dataLayer || []; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ "event": "add_to_cart", "detailed_event": "Product Added to Cart", "ecommerce": { "currency": "<currency>", "coupon": "<coupon>", "items": [ { "item_name": "<item_name>", "item_id": "<item_id>", "item_brand": "<item_brand>", "item_category": "<item_category>", "price": <price>, "quantity": <quantity>, "course_name": "<course_name>", "program_dates": "<program_dates>", } ], "value": <value> } });
Product Added to Cart
CRP Relevance - the code below has been updated for the CRP flow. This event should fire when the enrollment page loads - fire the event to the dataLayer AFTER the page load completed event.
Javascript Code
Variable Definitions
Further's Event Validation