FAQ

What does the payload look like?

When an event is sent using edgetag('tag', ...) the event payload will have the following structure:

type TagPayload = {
    action: 'tag'
    payload: EventPayload
    user: {
        userId: string
        session?: string
        email?: string
        phone?: string
        firstName?: string
        lastName?: string
        // ... additional user properties
    }
    query: Record<string, string>
    customData: Record<string, string>
}

type EventPayload = {
    eventId: string
    eventName: string
    timestamp: number
    pageUrl: string
    pageTitle: string
    userAgent: string
    data: {
      orderId?: string // present if the event is a conversion event
      contents?: ContentItem[] // present if the event contains items in the payload
    }
    // ... additional event properties
}

When user data is associated with the user using the edgetag('user', ...) or edgetag('data', ...) calls, the payload will be slightly different:

Last updated

Was this helpful?