> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-docs.bglobale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Advanced Checkout Events

## Advanced Checkout Events

**Global‑e Checkout Analytics** enables merchants to track and analyze detailed checkout-related activities by integrating with their analytics platforms. Merchants can listen to **Advanced Checkout Events** in their code and trigger custom events based on customer interactions.

By leveraging these events, merchants gain richer insights into shopper behavior, helping them optimize the checkout experience and reduce friction.

## Business Events

Business Events help merchants identify trends, optimize checkout flows, and troubleshoot issues that may prevent successful order completion.

This event is triggered when a customer chooses to provide a shipping address that is different from the billing address during the checkout process. It signals the start of entering a new shipping address and reflects the customer's decision to separate shipping and billing details.

| **This event does not include any data or payload.** | **Examples**POST \{globale domain}/Return/GetReturnDocuments |
| ---------------------------------------------------- | ------------------------------------------------------------ |

This event is triggered when a user completes and successfully validates all required billing address fields during the checkout process. It ensures that the billing information is fully entered and meets the necessary validation criteria.

Examples of mandatory fields:

* `First Name`: The first name of the person being billed (e.g., "John").
* `Last Name`: The last name of the person being billed (e.g., "Doe").
* `Address`: The full street address (e.g., "123 Main St, Apartment 4B").
* `Phone Number`: A valid contact number (e.g., "+1-123-456-7890").

| **This event does not include any data or payload.** | **Examples**// Subscribe to the BILLING\_ADDRESS\_COMPLETED event<br />var glegem = glegem \|\| function() \{<br /> ((window\["glegem"] = window\["glegem"] \|\| \{q:\[]}).q = window\["glegem"].q \|\| \[]).push(arguments);<br />};<br />glegem("OnClientEvent", function (source) \{<br /> if (source === GEMerchantUtils.ClientEvents.BILLING\_ADDRESS\_COMPLETED) \{<br /> console.log("Event: BILLING\_ADDRESS\_COMPLETED"); // No additional data provided<br /> }<br />}); |
| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

This event is triggered when an issue occurs during the checkout process, ranging from minor errors to critical blockages that prevent the customer from completing their purchase. Examples include product restrictions for a specific country, payment validation failures, or exceeding allowable weight limits for shipping.

| `failureCode`: Indicates the type of issue that occurred during the checkout process. Possible values include:`RestrictedProducts`: Products in the cart are restricted in the selected shipping country.`UpdateShippingCountryFailed`: The shipping country could not be updated successfully.`NoShippingOptions`: No shipping options are available for the selected address.`DutyThresholdOverFormalClearance`: The order exceeds the duty threshold requiring formal clearance.`PaymentDeclined`: The payment method was declined.`TechnicalError`: A technical error occurred during the checkout process.`SessionExpired`: The checkout session expired before completion.`NoPrepayForceDDP`: Prepayment of duties and taxes is not available for the order.`CartValidation`: The cart failed validation checks.`CouponAmountTooLow`: The applied coupon amount is below the required minimum value.<br />`reasonCode`: Provides additional details about the specific failure, if available. This property may be null in some cases. | **Examples**// Subscribe to the CHECKOUT\_FAILURE event<br />var glegem = glegem \|\| function() \{<br /> ((window\["glegem"] = window\["glegem"] \|\| \{q:\[]}).q = window\["glegem"].q \|\| \[]).push(arguments);<br />};<br />glegem("OnClientEvent", function (source, data) \{<br /> if (source === GEMerchantUtils.ClientEvents.CHECKOUT\_FAILURE) \{<br /> console.log("Event: CHECKOUT\_FAILURE");<br /> // Handle the 'failureCode' property<br /> if (data.failureCode) \{<br /> console.log(`Failure Code: ${data.failureCode}`);<br /> switch (data.failureCode) \{<br /> case "RestrictedProducts":<br /> console.log("Reason: Products are restricted in the selected shipping country.");<br /> break;<br /> case "UpdateShippingCountryFailed":<br /> console.log("Reason: Failed to update the shipping country.");<br /> break;<br /> case "NoShippingOptions":<br /> console.log("Reason: No shipping options are available for the selected address.");<br /> break;<br /> case "DutyThresholdOverFormalClearance":<br /> console.log("Reason: Order exceeds the duty threshold requiring formal clearance.");<br /> break;<br /> case "PaymentDeclined":<br /> console.log("Reason: Payment was declined.");<br /> break;<br /> case "TechnicalError":<br /> console.log("Reason: A technical error occurred during checkout.");<br /> break;<br /> case "SessionExpired":<br /> console.log("Reason: The checkout session expired.");<br /> break;<br /> case "NoPrepayForceDDP":<br /> console.log("Reason: Prepayment of duties and taxes is not available for this order.");<br /> break;<br /> case "CartValidation":<br /> console.log("Reason: The cart failed validation checks.");<br /> break;<br /> case "CouponAmountTooLow":<br /> console.log("Reason: Applied coupon amount is below the required minimum.");<br /> break;<br /> default:<br /> console.log("Reason: Unknown failure code.");<br /> }<br /> }<br /> // Handle the 'reasonCode' property, if available<br /> if (data.reasonCode) \{<br /> console.log(`Reason Code: ${data.reasonCode}`);<br /> } else \{<br /> console.log("No additional reason code provided.");<br /> }<br /> }<br />}); |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

This event is triggered when a customer selects or changes their payment method during checkout. For credit cards, the event is fired as soon as the card type (e.g., Visa, Mastercard) is recognized while the customer is typing their card details. For alternative payment methods, such as PayPal, the event is triggered when the customer selects or switches to a different payment option.

| The `PAYMENTMETHOD_CHANGED` event provides information about the payment method selected by the customer:<br />`id`: Specifies the unique identifier of the selected payment method.<br />`name`: Specifies the name of the selected payment method. Examples:`PayPal`: When the customer selects `PayPal`as the payment method.`Visa`: When the customer selects `Visa`as the payment method.`ApplePay`: When the customer selects `ApplePay`as the payment method. | **Examples**// Subscribe to the PAYMENTMETHOD\_CHANGED event<br />var glegem = glegem \|\| function() \{<br /> ((window\["glegem"] = window\["glegem"] \|\| \{q:\[]}).q = window\["glegem"].q \|\| \[]).push(arguments);<br />};<br />glegem("OnClientEvent", function (source, data) \{<br /> if (source === GEMerchantUtils.ClientEvents.PAYMENTMETHOD\_CHANGED) \{<br /> console.log("Event: PAYMENTMETHOD\_CHANGED");<br /> // Print the payment method name and ID<br /> if (data.id && data.name) \{<br /> console.log(`Payment Method Selected: ${data.name} (ID: ${data.id})`);<br /> }<br /> }<br />}); |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

**Implementation Tips and Best Practices**

The `PAYMENTMETHOD_CHANGED`event does not capture clicks on express payment methods, such as Apple Pay or Google Pay. These methods often bypass the standard payment selection process, and their interactions may need to be tracked separately through DOM events or platform-specific integrations.

This event is triggered when a user completes and successfully validates all required shipping address fields during the checkout process. It indicates that the shipping information is fully entered, verified, and ready for the next step. The event accounts for different scenarios, including when the shipping address matches the billing address or when alternative options are selected.

Examples of mandatory fields:

* `First Name`: The first name of the recipient (e.g., "Jane").
* `Last Name`: The last name of the recipient (e.g., "Smith").
* `Address`: The full shipping address (e.g., "456 Elm St, Suite 5").
* `Phone Number`: A valid contact number for delivery (e.g., "+1-987-654-3210").

| The event also provides information about the type of shipping address selected by the shopper:<br />`ShippingAddressType`: Specifies the type of shipping address. Possible values:`SameAsBilling`: When the shipping and billing addresses are the same, and the billing details are completed.`Alternative`: When the shopper chooses a shipping address different from the billing address.`Store`: When the shopper selects a store pickup option and confirms the store. (Optional feature)`CollectionPoint`: When the shopper selects and confirms a collection point. (Optional feature) | **Examples**// Subscribe to the SHIPPING\_ADDRESS\_COMPLETED event<br />var glegem = glegem \|\| function() \{<br /> ((window\["glegem"] = window\["glegem"] \|\| \{q:\[]}).q = window\["glegem"].q \|\| \[]).push(arguments);<br />};<br />glegem("OnClientEvent", function (source, data) \{<br /> if (source === GEMerchantUtils.ClientEvents.SHIPPING\_ADDRESS\_COMPLETED) \{<br /> console.log("Event: SHIPPING\_ADDRESS\_COMPLETED");<br /> // Handle the specific ShippingAddressType values<br /> if (data.ShippingAddressType === "SameAsBilling") \{<br /> console.log("Shipping Address Type: Same as Billing Address");<br /> } else if (data.ShippingAddressType === "Alternative") \{<br /> console.log("Shipping Address Type: Alternative Address Selected");<br /> } else if (data.ShippingAddressType === "Store") \{<br /> console.log("Shipping Address Type: Store Pickup Selected");<br /> } else if (data.ShippingAddressType === "CollectionPoint") \{<br /> console.log("Shipping Address Type: Collection Point Selected");<br /> }<br /> }<br />});// Subscribe to the BILLING\_ADDRESS\_COMPLETED event<br />var glegem = glegem \|\| function() \{<br /> ((window\["glegem"] = window\["glegem"] \|\| \{q:\[]}).q = window\["glegem"].q \|\| \[]).push(arguments);<br />};<br />glegem("OnClientEvent", function (source) \{<br /> if (source === GEMerchantUtils.ClientEvents.BILLING\_ADDRESS\_COMPLETED) \{<br /> console.log("Event: BILLING\_ADDRESS\_COMPLETED"); // No additional data provided<br /> }<br />}); |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

**Implementation Tips and Best Practices**

* This event is usually mapped to `add_shipping_info` in Google Analytics 4 (GA4) or equivalent events in other analytics platforms. It represents a key milestone in the checkout process, indicating that the user has provided their shipping information.
* In the Global-e checkout, the order of forms can vary based on the setup. The billing form might appear before the shipping form. When the billing address is completed, it will also trigger the `SHIPPING_ADDRESS_COMPLETED`event with `SameAsBilling`as the default, since billing and shipping are marked as the same by default. If the shopper chooses a different shipping address, the `SHIPPING_ADDRESS_COMPLETED`event will fire again, this time with `Alternative`as the value for `ShippingAddressType`.

This event is triggered when a customer selects a shipping method during the checkout process. It indicates that the customer has chosen their preferred shipping option.

| The `SHIPPINGMETHOD_SELECTION` event provides detailed information about the selected shipping method.<br />`id`: Specifies the element ID of the selected shipping option. Example: `def-ship-opt-2-10000388.opt``opt-2`: Indicates the user selected the second shipping option.`10000388`: Represents the unique identifier for the selected shipping method.<br />`price`: Specifies the cost of the selected shipping method, including the currency symbol. Example: `$ 7.00`.<br />These properties enable precise tracking of the shipping method chosen by the customer, allowing businesses to analyze preferences and calculate costs effectively. | **Examples**// Subscribe to the SHIPPINGMETHOD\_SELECTION event<br />var glegem = glegem \|\| function() \{<br /> ((window\["glegem"] = window\["glegem"] \|\| \{q:\[]}).q = window\["glegem"].q \|\| \[]).push(arguments);<br />};<br />glegem("OnClientEvent", function (source, data) \{<br /> if (source === GEMerchantUtils.ClientEvents.SHIPPINGMETHOD\_SELECTION) \{<br /> console.log("Event: SHIPPINGMETHOD\_SELECTION");<br /> // Access and log the 'id' property<br /> if (data.id) \{<br /> console.log("Selected Shipping Option ID:", data.id);<br /> // Extract and log the option number and shipping method ID<br /> const optionMatch = data.id.match(/opt-(\d+)/);<br /> const methodIdMatch = data.id.match(/(\d+)\$/);<br /> if (optionMatch) \{<br /> console.log("Selected Option Number:", optionMatch\[1]);<br /> }<br /> if (methodIdMatch) \{<br /> console.log("Shipping Method ID:", methodIdMatch\[1]);<br /> }<br /> }<br /> // Access and log the 'price' property<br /> if (data.price) \{<br /> console.log("Shipping Price:", data.price);<br /> }<br /> }<br />}); |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

This event is triggered when a shopper selects a store collection option during the checkout process. It signals that the customer has chosen to pick up their order from a designated store location instead of opting for delivery.

| **This event does not include any data or payload.** | **Examples**// Subscribe to the STORE\_SELECTION event<br />var glegem = glegem \|\| function() \{<br /> ((window\["glegem"] = window\["glegem"] \|\| \{q:\[]}).q = window\["glegem"].q \|\| \[]).push(arguments);<br />};<br />glegem("OnClientEvent", function (source) \{<br /> if (source === GEMerchantUtils.ClientEvents.STORE\_SELECTION) \{<br /> console.log("Event: STORE\_SELECTION"); // No additional data provided<br /> }<br />}); |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

**Implementation Tips and Best Practices**

The **store collection feature** is an optional capability and is not available for all merchants by default. Merchants need to enable this feature explicitly for it to be offered as a shipping option.

This event is triggered when the customer selects their preferred option for paying duties and taxes during the checkout process. It occurs when the customer chooses between:

* **Paying duties and taxes at checkout**: The customer opts to prepay duties and taxes as part of their order total.
* **Paying duties and taxes upon delivery**: The customer decides to pay duties and taxes directly to the carrier or customs upon receiving the shipment.

| The `TAX_OPTION_SELECTED`event provides information about the customer's choice for handling duties and taxes during checkout:<br />`id`: Specifies the selected tax payment option.Possible values:`IncludeInOrder`: Indicates the customer has chosen to prepay duties and taxes as part of their order total.`ManualPay`: A valid contact number (e.g., "+1-123-456-7890").Examples:`IncludeInOrder`: The customer chooses to pay duties and taxes during checkout.`ManualPay`: The customer opts to pay duties and taxes when the shipment is delivered. | **Examples**// Subscribe to the TAX\_OPTION\_SELECTED event<br />var glegem = glegem \|\| function() \{<br /> ((window\["glegem"] = window\["glegem"] \|\| \{q:\[]}).q = window\["glegem"].q \|\| \[]).push(arguments);<br />};<br />glegem("OnClientEvent", function (source, data) \{<br /> if (source === GEMerchantUtils.ClientEvents.TAX\_OPTION\_SELECTED) \{<br /> console.log("Event: TAX\_OPTION\_SELECTED");<br /> // Handle the 'id' property<br /> if (data.id === "IncludeInOrder") \{<br /> console.log("Tax Option: Include in Order - Duties and taxes will be paid at checkout.");<br /> } else if (data.id === "ManualPay") \{<br /> console.log("Tax Option: Manual Pay - Duties and taxes will be paid upon delivery.");<br /> }<br /> }<br />}); |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

**Implementation Tips and Best Practices**

There are scenarios where this event may not be triggered. For example, if the shopper proceeds with the default option (paying duties and taxes within the checkout) without making any changes, the event won't fire. Additionally, in cases where the country's duties and taxes configuration is set to "Hidden Force DDP," meaning that duties and taxes are already included in the product prices, this event will not be triggered. Similarly, if the total value of the checkout falls below the country's tax threshold, or if the country does not impose duties and taxes at all, the event will not occur. These situations ensure the event is only sent when a manual selection of tax payment options is required and applied by the shopper.

## Data Object Model Events

Data Object Model (DOM) Events track direct customer interactions with elements on the checkout page. These events help Merchants to optimize the user experience, reduce friction in forms, and increase checkout completion rates.

This event is triggered when a customer clicks a button during the checkout. It captures details about the button interaction, including its purpose and outcome. For Pay or Apply Coupon buttons, it provides additional data on payment or coupon code validation results.

| The BUTTON\_CLICKED event provides details about the button that was interacted with:<br />`id`: The unique identifier of the button element. Example: "`PayButton`".<br />`tag`: The HTML tag name of the button. Example: "`BUTTON`".<br />`text`: The visible text displayed on the button. Example: "`Pay and place order`".<br />`action`: A description of the button’s function. Example: "`Pay`".<br />`success`: Indicates whether the action was successful (`true`) or failed (`false`). Example: `false`(the payment attempt failed due to validation errors).<br />`error`: If success is false, this field provides details about the failure reason. Example: "`CheckoutFormValidationFailed`" (the checkout form contains missing or invalid fields).<br />`errorFields`: If applicable, lists the specific form fields that caused the validation failure. Example:CheckoutData\_BillingFirstName,<br />CheckoutData\_BillingLastName,<br />CheckoutData\_BillingAddress1,<br />BillingCity,<br />BillingCountyID,<br />BillingZIP,<br />CheckoutData\_BillingPhone | **Examples**// Subscribe to the BUTTON\_CLICKED event<br />var glegem = glegem \|\| function() \{<br /> ((window\["glegem"] = window\["glegem"] \|\| \{q:\[]}).q = window\["glegem"].q \|\| \[]).push(arguments);<br />};<br />glegem("OnClientEvent", function (source, data) \{<br /> if (source === GEMerchantUtils.ClientEvents.BUTTON\_CLICKED) \{<br /> console.log("Event: BUTTON\_CLICKED");<br /> // Log button details<br /> console.log(`Button ID: ${data.id}`);<br /> console.log(`Text: ${data.text}`);<br /> console.log(`Action: ${data.action}`);<br /> // Handle standard payment button<br /> if (data.action === "Pay") \{<br /> if (data.success) \{<br /> console.log("Payment Successful.");<br /> } else \{<br /> console.log("Payment Failed.");<br /> console.log(`Error: ${data.error}`);<br /> if (data.errorFields) \{<br /> console.log("Validation Errors in Fields:", data.errorFields);<br /> }<br /> }<br /> }<br /> // Handle express payment methods<br /> if (data.action === "Express Payment button clicked") \{<br /> console.log(`Express Payment Method Selected: ${data.name}`);<br /> }<br /> }<br />}); |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

**Implementation Tips and Best Practices**

The `BUTTON_CLICKED`event tracks when a customer initiates a payment by clicking the `Pay`button. However, this event does not capture interactions with express payment methods, such as Apple Pay or PayPal Express, which may bypass the standard checkout flow.

For express payment methods, the event can trigger with an **action**value is "`Express Payment button clicked`". If tracking express payments is necessary, consider implementing additional event listeners specifically for these buttons to ensure full coverage of all payment methods.

This event is triggered when a customer interacts with a checkbox within the checkout. It captures when a checkbox is clicked and whether it is checked or unchecked. This event is useful for tracking user preferences, such as opting in for promotional emails or agreeing to terms and conditions.

| The event provides details about the checkbox that was interacted with:<br />`id`: The unique identifier of the checkbox element. Example: "`CheckoutData_OffersFromMerchant`".<br />`name`: The name attribute of the checkbox element. Example: "`CheckoutData.OffersFromMerchant`".<br />`checked`: Indicates whether the checkbox is selected (`true`) or deselected (`false`). Example: `true`(the customer opted in to receive offers from the merchant).<br />Note: The example above refers to a checkbox where the customer can opt in to receive promotional offers from the merchant. | **Examples**// Subscribe to the CHECKBOX\_CHANGE event<br />var glegem = glegem \|\| function() \{<br /> ((window\["glegem"] = window\["glegem"] \|\| \{q:\[]}).q = window\["glegem"].q \|\| \[]).push(arguments);<br />};<br />glegem("OnClientEvent", function (source, data) \{<br /> if (source === GEMerchantUtils.ClientEvents.CHECKBOX\_CHANGE) \{<br /> console.log("Event: CHECKBOX\_CHANGE");<br /> // Log checkbox details<br /> console.log(`Checkbox ID: ${data.id}`);<br /> console.log(`Checkbox Name: ${data.name}`);<br /> console.log(`Checked: ${data.checked}`);<br /> // Specific handling for merchant offers checkbox<br /> if (data.id === "CheckoutData\_OffersFromMerchant" \|\| data.name === "CheckoutData.OffersFromMerchant") \{<br /> if (data.checked) \{<br /> console.log("User opted in to receive offers from the merchant.");<br /> } else \{<br /> console.log("User opted out of receiving offers from the merchant.");<br /> }<br /> }<br /> }<br />}); |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

**Implementation Tips and Best Practices**

The `CHECKBOX_CHANGE`event can be used with Klaviyo or similar tools to track marketing opt-in preferences. If you're using the `INPUT_BLUR` event for customer identification, make sure to capture the checkbox status before sending data to the platform. This ensures that marketing emails are only sent to users who have explicitly opted in. Refer to the `INPUT_BLUR`event for tracking email input fields.

This event is triggered when a customer selects or changes a value in a dropdown (select list) during checkout. It helps track user interactions with selectable options, such as choosing a country, state, county, etc.

| The event provides details about the element that was interacted with:<br />`id`: The unique identifier of the select list or radio button element. Example: "`BillingCountyID`".<br />`name`: The name attribute of the element. Example: "`CheckoutData.BillingCountyID`".<br />`text`: The visible text of the selected option. Example: "`Clare`".<br />`value`: The underlying value associated with the selected option. Example: "`5`". | **Examples**// Subscribe to the COMBO\_CHANGED event<br />var glegem = glegem \|\| function() \{<br /> ((window\["glegem"] = window\["glegem"] \|\| \{q:\[]}).q = window\["glegem"].q \|\| \[]).push(arguments);<br />};<br />glegem("OnClientEvent", function (source, data) \{<br /> if (source === GEMerchantUtils.ClientEvents.COMBO\_CHANGED) \{<br /> console.log("Event: COMBO\_CHANGED");<br /> // Log dropdown or radio button details<br /> console.log(`Element ID: ${data.id}`);<br /> console.log(`Element Name: ${data.name}`);<br /> console.log(`Selected Text: ${data.text}`);<br /> console.log(`Selected Value: ${data.value}`);<br /> }<br />}); |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

**Implementation Tips and Best Practices**

The `BUTTON_CLICKED`event tracks when a customer initiates a payment by clicking the `Pay`button. However, this event does not capture interactions with express payment methods, such as Apple Pay or PayPal Express, which may bypass the standard checkout flow.

For express payment methods, the event can trigger with an **action**value is "`Express Payment button clicked`". If tracking express payments is necessary, consider implementing additional event listeners specifically for these buttons to ensure full coverage of all payment methods..

This event is triggered when a customer moves out of (or "unfocuses") a text input field after entering or interacting with it. It helps track how users engage with form fields during checkout, providing insights into input behavior and potential friction points.

| The event includes details about the input field the customer was interacting with:<br />`id`: The unique identifier of the input field. Example: "`CheckoutData_Email`".<br />`name`: The name attribute of the input field. Example: "`CheckoutData.Email`".<br />`value`: The text entered by the customer before leaving the field. Example: "`example@global-e.com`".<br />Note: The example above refers to the billing email address field in the checkout form. | **Examples**// Subscribe to the STORE\_SELECTION event<br />var glegem = glegem \|\| function() \{<br /> ((window\["glegem"] = window\["glegem"] \|\| \{q:\[]}).q = window\["glegem"].q \|\| \[]).push(arguments);<br />};<br />glegem("OnClientEvent", function (source) \{<br /> if (source === GEMerchantUtils.ClientEvents.STORE\_SELECTION) \{<br /> console.log("Event: STORE\_SELECTION"); // No additional data provided<br /> }<br />}); |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

**Implementation Tips and Best Practices**

This `INPUT_BLUR`event can be used with Klaviyo or similar tools to trigger an identification action. However, ensure that you capture the marketing opt-in checkbox value before sending data to the platform to prevent sending emails without the user's consent. Refer to `CHECKBOX_CHANGE` event.
