Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove write key from payload event when sending it to segment #1143

Merged

Conversation

rafael-couto-p
Copy link
Contributor

This pull request includes a change to the SegmentDestination function in libs/core-functions/src/functions/segment-destination.ts. The change ensures that the writeKey is removed from the event payload before sending the HTTP request.

Why?

We are moving away from Segment API and using jitsu to send our events on our website, but we had to create a function to remove the write key that jitsu tries to send to segment, because it's unnecessary and does not work without the function.

Function:
image

Example of what happens if we don't use that function:
image
image

  "status":400
  "statusText":"Bad Request"
  "elapsedMs":273
  "response": {
    "success":false
    "message":"An invalid write key was provided"
    "code":"invalid_request"
  }

@rafael-couto-p rafael-couto-p marked this pull request as ready for review November 7, 2024 17:17
@rafael-couto-p rafael-couto-p marked this pull request as draft November 7, 2024 17:18
@rafael-couto-p rafael-couto-p marked this pull request as ready for review November 7, 2024 17:18
@absorbb absorbb merged commit fbcddf7 into jitsucom:newjitsu Nov 11, 2024
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants