Skip to main content

advanced_dom_window_resized
interface

Requires access to the Advanced DOM Events in web pixel app extensions scope. To request access, please use the form in the Partner Dashboard. This scope is only available for apps that have a heatmap and/or session recordings. The Advanced DOM Events cannot be used on custom apps.

The advanced_dom_window_resized event is published when a customer resizes their browser window.

Shopify Plus

This event is limited on checkout to stores on the Shopify Plus plan.

string

The client-side ID of the customer, provided by Shopify

No additional data is provided by design. Use the event context to get the latest window size.

string

The ID of the customer event

string

The name of the customer event.

number

The sequence index number of the event.

string

The timestamp of when the customer event occurred, in ISO 8601 format

.AdvancedDom
Was this section helpful?

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,
});
});
});