Hey Team. We were trying a klaviyo destination for...
# support
h
Hey Team. We were trying a klaviyo destination for a track event. For a very basic track event also we are getting an error:
Copy code
{
  "response": "event.trim is not a function",
  "firstAttemptedAt": "2024-01-12T06:47:43.428Z",
  "content-type": ""
}
The track event looked like
Copy code
rudderanalytics.track({
  email: "aram@consolidate.health",
  event: "Aram-Custom",
  properties: {
    data: "something something"
  }
})
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
h
Workspace:
consolidate-health
h
as per the docs "To send track or screen type event using an SDK that does not persist user context information after identify, you need to pass the information in context.traits."
h
Oh thanks. Will try that.
h
@hundreds-football-16759, one more thing,
email
should not be at the root level of the message. Assuming you are using the Node SDK here is the data type for the track payloads, https://github.com/rudderlabs/rudder-sdk-node/blob/1da270a75dbfc2dfddb6154cb62978716cf694cd/index.d.ts#L199
h
@helpful-daybreak-79835 yup that is kinda what I tried to point out:)
👍 1
h
@hundreds-football-16759, seems like the value for
event
field is also not a string type. An error like this will pop up for this reason. Can you please double-check your instrumentation?