# ui_extension_errored The `ui_extension_errored` event logs occurrences when an extension fails to render due to an uncaught exception in the extension code. This event is only available on checkout. ```javascript import {register} from '@shopify/web-pixels-extension'; register(({analytics}) => { analytics.subscribe('ui_extension_errored', (event) => { // Example for accessing event data const {apiVersion, appId, appName, appVersion, trace} = event.data.alert; const payload = { event_name: event.name, event_data: { apiVersion, appId, appName, appVersion, trace, }, }; // Example for sending event data to third party servers fetch('https://example.com/pixel', { method: 'POST', body: JSON.stringify(payload), keepalive: true, }); }); }); ``` ```javascript analytics.subscribe('ui_extension_errored', (event) => { // Example for accessing event data const {apiVersion, appId, appName, appVersion, trace} = event.data.alert; const payload = { event_name: event.name, event_data: { apiVersion, appId, appName, appVersion, trace, }, }; // Example for sending event to third party servers fetch('https://example.com/pixel', { method: 'POST', body: JSON.stringify(payload), keepalive: true, }); }); ``` ## Properties ### PixelEventsUiExtensionErrored The `ui_extension_errored` event logs an instance of a UI extension encountering an error. ### clientId value: `string` The client-side ID of the customer, provided by Shopify ### context value: `Context` ### data value: `PixelEventsUiExtensionErroredData` ### id value: `string` The ID of the customer event ### name value: `string` The name of the customer event ### seq value: `number` The sequence index number of the event. ### timestamp value: `string` The timestamp of when the customer event occurred, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format ### type value: `EventType.Standard` ### Context A snapshot of various read-only properties of the browser at the time of event ### document value: `WebPixelsDocument` Snapshot of a subset of properties of the `document` object in the top frame of the browser ### navigator value: `WebPixelsNavigator` Snapshot of a subset of properties of the `navigator` object in the top frame of the browser ### window value: `WebPixelsWindow` Snapshot of a subset of properties of the `window` object in the top frame of the browser ### WebPixelsDocument A snapshot of a subset of properties of the `document` object in the top frame of the browser ### characterSet value: `string` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Document), returns the character set being used by the document ### location value: `Location` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Document), returns the URI of the current document ### referrer value: `string` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Document), returns the URI of the page that linked to this page ### title value: `string` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Document), returns the title of the current document ### Location A snapshot of a subset of properties of the `location` object in the top frame of the browser ### hash value: `string` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Location), a string containing a `'#'` followed by the fragment identifier of the URL ### host value: `string` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Location), a string containing the host, that is the hostname, a `':'`, and the port of the URL ### hostname value: `string` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Location), a string containing the domain of the URL ### href value: `string` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Location), a string containing the entire URL ### origin value: `string` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Location), a string containing the canonical form of the origin of the specific location ### pathname value: `string` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Location), a string containing an initial `'/'` followed by the path of the URL, not including the query string or fragment ### port value: `string` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Location), a string containing the port number of the URL ### protocol value: `string` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Location), a string containing the protocol scheme of the URL, including the final `':'` ### search value: `string` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Location), a string containing a `'?'` followed by the parameters or "querystring" of the URL ### WebPixelsNavigator A snapshot of a subset of properties of the `navigator` object in the top frame of the browser ### cookieEnabled value: `boolean` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Navigator), returns `false` if setting a cookie will be ignored and true otherwise ### language value: `string` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Navigator), returns a string representing the preferred language of the user, usually the language of the browser UI. The `null` value is returned when this is unknown ### languages value: `ReadonlyArray` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Navigator), returns an array of strings representing the languages known to the user, by order of preference ### userAgent value: `string` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Navigator), returns the user agent string for the current browser ### WebPixelsWindow A snapshot of a subset of properties of the `window` object in the top frame of the browser ### innerHeight value: `number` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window), gets the height of the content area of the browser window including, if rendered, the horizontal scrollbar ### innerWidth value: `number` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window), gets the width of the content area of the browser window including, if rendered, the vertical scrollbar ### location value: `Location` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window), the location, or current URL, of the window object ### origin value: `string` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window), the global object's origin, serialized as a string ### outerHeight value: `number` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window), gets the height of the outside of the browser window ### outerWidth value: `number` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window), gets the width of the outside of the browser window ### pageXOffset value: `number` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window), an alias for window.scrollX ### pageYOffset value: `number` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window), an alias for window.scrollY ### screen value: `Screen` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Screen), the interface representing a screen, usually the one on which the current window is being rendered ### screenX value: `number` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window), the horizontal distance from the left border of the user's browser viewport to the left side of the screen ### screenY value: `number` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window), the vertical distance from the top border of the user's browser viewport to the top side of the screen ### scrollX value: `number` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window), the number of pixels that the document has already been scrolled horizontally ### scrollY value: `number` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window), the number of pixels that the document has already been scrolled vertically ### Screen The interface representing a screen, usually the one on which the current window is being rendered ### height value: `number` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Screen/height), the height of the screen ### width value: `number` Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Screen/width), the width of the screen ### PixelEventsUiExtensionErroredData ### error value: `UiExtensionError` ### UiExtensionError An object that contains data about a UI Extension error that occurred. ### apiVersion value: `string` The API version used by the extension. ### appId value: `string` The unique identifier of the app that the extension belongs to. ### appName value: `string` The name of the app that the extension belongs to. ### appVersion value: `string` The version of the app that encountered the error. ### extensionName value: `string` The name of the extension that encountered the error. ### extensionTarget value: `string` The [target](https://shopify.dev/docs/api/checkout-ui-extensions/latest/targets) of the extension, for example "purchase.checkout.delivery-address.render-after". ### message value: `string` The message associated with the error that occurred. ### placementReference value: `string | null` The [placement reference](https://shopify.dev/docs/apps/build/checkout/test-checkout-ui-extensions#dynamic-targets) of the extension, only populated for dynamic targets. ### trace value: `string` The stack trace associated with the error that occurred. ### type value: `UiExtensionErrorType` The type of error that occurred. ### UiExtensionErrorType ### ExtensionUsageError value: `EXTENSION_USAGE_ERROR` ### EventType ### AdvancedDom value: `advanced-dom` ### Custom value: `custom` ### Dom value: `dom` ### Meta value: `meta` ### Standard value: `standard`