-
Notifications
You must be signed in to change notification settings - Fork 254
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
[MAIN] [STRATCONN] 4261 Mixpanel Multistatus support #2536
base: main
Are you sure you want to change the base?
Conversation
… into STRATCONN-4261-mixpanel-multistatus
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2536 +/- ##
==========================================
+ Coverage 78.00% 78.58% +0.58%
==========================================
Files 991 1030 +39
Lines 17388 18229 +841
Branches 3281 3441 +160
==========================================
+ Hits 13563 14325 +762
- Misses 2737 2759 +22
- Partials 1088 1145 +57 ☔ View full report in Codecov by Sentry. |
packages/destination-actions/src/destinations/mixpanel/common/utils.ts
Outdated
Show resolved
Hide resolved
packages/destination-actions/src/destinations/mixpanel/common/utils.ts
Outdated
Show resolved
Hide resolved
hi @AnkitSegment and @varadarajan-tw . Ankit and I just reviewed PR with @spjtls9 from Mixpanel.
|
Hey @joe-ayoub-segment ,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @AnkitSegment ,
Just had a look through the code.
I'm not familiar with Hubspot's API or this Destination so I'm not able to properly review. But I do have a couple of questions I'm sure you can easily answer ;).
Question 1: The the handleMixPanelApiResponse function, why is this condition present?
if (apiResponse.data.code === 400 || apiResponse.data.code === 200) {
// do stuff
}
if (apiResponse.data.code !== 200 && apiResponse.data.code !== 400) {
// do other stuff
}
Is it because If a 400 response is returned it's still possible that some events were successfully delivered? And conversely, if a 200 response is returned then there can also be some failures?
Question 2: for the trackPurchase function, why are there 2 arrays, events and sentEvents?
Why is this happening?
sentEvents.push(purchaseEvents as object as JSONLikeObject)
events.push(...purchaseEvents)
I assume sentEvents is just a duplicate array which keeps track of the events which were actually sent (so you have a reference for the index of each event when you process the response)?
Also did you make a decision regarding how to roll this out? Will it be behind a feature flag? |
Hello @joe-ayoub-segment , Answer 2. Yes, sendEvents is to track the events that were actually sent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for adding the feature flag.
Tagging @joe-ayoub-segment to see if he has any other comments.
packages/destination-actions/src/destinations/mixpanel/trackPurchase/index.ts
Outdated
Show resolved
Hide resolved
packages/destination-actions/src/destinations/mixpanel/trackPurchase/index.ts
Show resolved
Hide resolved
packages/destination-actions/src/destinations/mixpanel/trackPurchase/index.ts
Outdated
Show resolved
Hide resolved
hi @AnkitSegment thanks for making the update to add the FF. |
hi @AnkitSegment please let me know when you'd like me to rereview. |
Multistatus support is added for Mixpanel destinations
JIRA TICKET: https://segment.atlassian.net/browse/STRATCONN-4261
Testing Docs
A summary of your pull request, including the what change you're making and why.
Testing
Include any additional information about the testing you have completed to
ensure your changes behave as expected. For a speedy review, please check
any of the tasks you completed below during your testing._