Search...
onEventPublished( )
An event that's triggered when a Wix Event is published.
Description
The onEventPublished()
event handler runs when a Wix Event is published. The received EventPublished
object contains information about the Wix Event that was published and metadata for the event.
Note: Backend events are not fired when previewing your site.
Syntax
function wixEvents_onEventPublished(event: EventPublished): void
onEventPublished Parameters
NAME
TYPE
DESCRIPTION
event
Optional
EventPublished
Information about the Wix Event that was published and metadata for the event.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
onEventPublished example
Copy Code
12 export function wixEvents_onEventPublished(event) {3 const eventId = event.metadata.id4 const entityId = event.data.event._id;5 }67