Skip to main content

subscribeByMarker

Subscribe to an event on a product. 🔐 This method requires authorization.

Description

Events.subscribeByMarker( marker, productId, langCode, threshold );

Parameters schema

Schema

marker:* string
Event marker
example: test_event

productId:* string
Product id
example: 14

langCode: string
Language code
example: en_US

threshold: number
Threshold value for comparing numerical value
example: 0

Examples

Minimal example

const value = await Events.subscribeByMarker('test_event', 1, 1);

Example with attributes

const value = await Events.subscribeByMarker('test_event', 1, 1, 'en_US', 0);

Returns nothing if the subscription was successful.