advanced_ dom_ window_ resizedinterface
The event is published when a customer resizes their browser window.
This event is limited on checkout to stores on the Shopify Plus plan.
Anchor to propertiesProperties
- Anchor to clientIdclientIdstring
The client-side ID of the customer, provided by Shopify
- Anchor to datadata
No additional data is provided by design. Use the event context to get the latest window size.
- string
The ID of the customer event
- Anchor to namenamestring
The name of the customer event.
- number
The sequence index number of the event.
- Anchor to timestamptimestampstring
The timestamp of when the customer event occurred, in ISO 8601 format
- Anchor to typetype.AdvancedDom
PixelEventsAdvancedDomWindowResized
The `advanced_dom_window_resized` event logs an instance where the browser window has been resized.
- clientId
The client-side ID of the customer, provided by Shopify
string
- data
No additional data is provided by design. Use the event context to get the latest window size.
PixelEventsAdvancedDomWindowResizedData
- id
The ID of the customer event
string
- name
The name of the customer event.
string
- seq
The sequence index number of the event.
number
- timestamp
The timestamp of when the customer event occurred, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
string
- type
EventType.AdvancedDom
export interface PixelEventsAdvancedDomWindowResized {
/**
* The client-side ID of the customer, provided by Shopify
*/
clientId?: string;
/**
* No additional data is provided by design. Use the event context to get the
* latest window size.
*/
data?: PixelEventsAdvancedDomWindowResizedData;
/**
* The ID of the customer event
*/
id?: string;
/**
* The name of the customer event.
*/
name?: string;
/**
* The sequence index number of the event.
*/
seq?: number;
/**
* The timestamp of when the customer event occurred, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
*/
timestamp?: string;
type?: EventType.AdvancedDom;
}
PixelEventsAdvancedDomWindowResizedData
No additional data is provided by design. Use the event context to get the latest window size.
export interface PixelEventsAdvancedDomWindowResizedData {}
EventType
- AdvancedDom
advanced-dom
- Custom
custom
- Dom
dom
- Meta
meta
- Standard
standard
export enum EventType {
AdvancedDom = 'advanced-dom',
Custom = 'custom',
Dom = 'dom',
Meta = 'meta',
Standard = 'standard',
}
Accessing Advanced DOM Events
App Pixel
examples
Accessing Advanced DOM Events
App Pixel
import {register} from '@shopify/web-pixels-extension'; register(({analytics}) => { analytics.subscribe('advanced_dom_window_resized', (event) => { // Accessing event payload const payload = { event_name: event.name, event_data: { width: event.context.window.innerWidth, height: event.context.window.innerHeight, }, }; // E.g. sending event to third party servers fetch('https://example.com/pixel', { method: 'POST', body: JSON.stringify(payload), keepalive: true, }); }); });