further-external / brookings-datalayer-specs

An Apollo generated Event Driven Data Layer
0 stars 1 forks source link

Event Booking Completed #13

Open jerry-bennett opened 1 year ago

jerry-bennett commented 1 year ago

Event Booking Completed

Javascript Code

window.dataLayer = window.dataLayer || [];
dataLayer.push({ ecommerce: null });  // Clear the previous ecommerce object.
dataLayer.push({
  "event": "purchase",
  "detailed_event": "Event Booking Completed",
    "ecommerce": {
        "currency": "<currency>",
        "items": [
            {
                "item_id": "<item_id>",
                "item_name": "<item_name>"
            }
        ],
        "transaction_id": "<transaction_id>",
        "value": <value>
    }
});

Variable Definitions

Path Type Description Example Pattern Min Length Max Length Minimum Maximum Multiple Of
ecommerce.currency string The currency, in 3-letter ISO 4217 format. USD
ecommerce.items[n].item_id string Item ID (context-specific).The product primary ID (SKU or UPC) SKU_12345
ecommerce.items[n].item_name string Item Name (context-specific). jeggings
ecommerce.transaction_id string The unique identifier of a transaction. T_12345, 19283j2nm9jdjs ^[a-zA-Z0-9]{6,20}$ 6 20
ecommerce.value number The monetary value of the event. 7.77, 239.55, 659
nedierecel commented 1 year ago

@jerry-bennett This will be ready for QA in Hubspot. I manually created in GTM vs. Apollo.