* @param {SpecTrack} event The track event
* @param {Object.<string, any>} settings Custom settings
async function onTrack(event, settings) {
email: event.properties.email,
identifier: event.properties.identifier,
name: event.properties.full_name,
address_1: event.properties.address_1,
address_2: event.properties.address_2,
city: event.properties.city,
state: event.properties.state,
postal_code: event.properties.postal_code
order_id: event.properties.order_id,
total: event.properties.order_total,
order_date: event.receivedAt
const response = await fetch('https://api.heypoplar.com/v1/order', {
Authorization: `Bearer ${settings.poplarApiKey}`,
'Content-Type': 'application/json'
body: JSON.stringify(body)