Provides access to Shopify's [customer event API](/docs/api/web-pixels-api/standard-events)
import {register} from '@shopify/web-pixels-extension';
register(({analytics, browser, settings, init}) => {
analytics.subscribe('page_viewed', (event) => {
// subscribe to page_viewed events
});
analytics.subscribe('all_events', (event) => {
// subscribe to all events
});
analytics.subscribe('all_standard_events', (event) => {
// subscribe to all standard events
});
analytics.subscribe('all_custom_events', (event) => {
// subscribe to all custom events
});
});
analytics.subscribe('page_viewed', (event) => {
// subscribe to page_viewed events
});
analytics.subscribe('all_events', (event) => {
// subscribe to all events
});
analytics.subscribe('all_standard_events', (event) => {
// subscribe to all standard events
});
analytics.subscribe('all_custom_events', (event) => {
// subscribe to all custom events
});
The name of the customer event
string