-
Notifications
You must be signed in to change notification settings - Fork 87
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
Pendo sdk #164
Pendo sdk #164
Conversation
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.
size-limit report
Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
---|---|---|---|---|
dist/rudder-analytics.min.js | 56.97 KB (-0.38% 🔽) | 1.2 s (-0.38% 🔽) | 333 ms (-2.84% 🔽) | 1.5 s |
integrations/Pendo/browser.js
Outdated
identify(rudderElement) { | ||
let visitorObj = {}; | ||
visitorObj.id = | ||
rudderElement.message.userId || rudderElement.message.anonymousId; |
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.
this is correct.. What segment does is I user id is not present they append the anonymous id with PENDO_T . We can implement this too
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.
Ok will do that, and what u are suggesting is actually correct, it will be easy to understand anonymous user by looking at Prefix :: PENDO_T
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.
fixed
integrations/Pendo/browser.js
Outdated
if (rudderElement.message.context.traits) { | ||
visitorObj = { | ||
...visitorObj, | ||
...rudderElement.message.context.traits, |
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.
please check if nested objects (the traits) are sent if it is being handled by panda or we have to send it as flattened?
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.
Flattened the traits object and sending it to PendoAgent.
Pendo has an agent section that accepts traits that are sent for that visitor or account.
integrations/Pendo/browser.js
Outdated
} | ||
|
||
track(rudderElement) { | ||
window.pendoCli.track(rudderElement.message.event); |
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.
I checked track events are sent like this in panda sdk --- >
pendo.track("User Registered", {
userId: user.id,
plan: user.plan,
accountType: "Facebook"
});
});
So shouldn't the properties go along with the name of the event?
Here also check about the nested properties.
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.
Sending properties along with track calls.
We don't need to flatten this properties. Pendo take care of nested objects.
Fixed
@@ -40,7 +41,7 @@ const integrations = { | |||
OPTIMIZELY: Optimizely.default, | |||
BUGSNAG: Bugsnag.default, | |||
FULLSTORY: Fullstory.default, | |||
TVSQUARED: TVSquared.default, |
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.
This should not be deleted?
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.
fixed
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.
size-limit report
Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
---|---|---|---|---|
dist/rudder-analytics.min.js | 57.53 KB (+0.6% 🔺) | 1.2 s (+0.6% 🔺) | 348 ms (+14.5% 🔺) | 1.5 s |
…pend anonymous id to _Pendo_ prefix
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.
size-limit report
Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
---|---|---|---|---|
dist/rudder-analytics.min.js | 57.77 KB (+1.02% 🔺) | 1.2 s (+1.02% 🔺) | 332 ms (-9.64% 🔽) | 1.5 s |
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.
size-limit report
Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
---|---|---|---|---|
dist/rudder-analytics.min.js | 57.78 KB (+1.03% 🔺) | 1.2 s (+1.03% 🔺) | 411 ms (+25.89% 🔺) | 1.6 s |
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.
size-limit report
Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
---|---|---|---|---|
dist/rudder-analytics.min.js | 57.81 KB (+1.08% 🔺) | 1.2 s (+1.08% 🔺) | 336 ms (+32.69% 🔺) | 1.5 s |
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.
size-limit report
Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
---|---|---|---|---|
dist/rudder-analytics.min.js | 57.75 KB (+1% 🔺) | 1.2 s (+1% 🔺) | 319 ms (+37.87% 🔺) | 1.5 s |
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
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.
Few comments on functionality.
Add a PR to production-staging branch too
integrations/Pendo/browser.js
Outdated
group(rudderElement) { | ||
const obj = {}; | ||
let accountObj = {}; | ||
const { traits } = rudderElement.message.context; |
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.
our group level traits are present at top level.
user traits are present inside context.
I think we need to send both visitor and account object by reading traits from top level and under context.
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.
Sending both object
integrations/Pendo/browser.js
Outdated
if (traits) { | ||
accountObj = { | ||
...accountObj, | ||
...flattenJsonPayload(traits), |
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.
also is flatten necessary?
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.
Removing flatten as Pendo cannot recognize property with dot operator
integrations/Pendo/browser.js
Outdated
...accountObj, | ||
...flattenJsonPayload(traits), | ||
}; | ||
obj.account = accountObj; |
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.
for account there seems to be a concept of parentAccounts. Can you check that
|
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.
size-limit report
Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
---|---|---|---|---|
dist/rudder-analytics.min.js | 57.75 KB (+1% 🔺) | 1.2 s (+1% 🔺) | 381 ms (+28.82% 🔺) | 1.6 s |
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.
size-limit report
Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
---|---|---|---|---|
dist/rudder-analytics.min.js | 57.71 KB (+0.91% 🔺) | 1.2 s (+0.91% 🔺) | 346 ms (+9.6% 🔺) | 1.5 s |
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.
size-limit report
Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
---|---|---|---|---|
dist/rudder-analytics.min.js | 57.77 KB (+1.02% 🔺) | 1.2 s (+1.02% 🔺) | 318 ms (-0.05% 🔽) | 1.5 s |
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.
size-limit report
Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
---|---|---|---|---|
dist/rudder-analytics.min.js | 57.73 KB (+0.95% 🔺) | 1.2 s (+0.95% 🔺) | 226 ms (-51.89% 🔽) | 1.4 s |
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.
size-limit report
Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
---|---|---|---|---|
dist/rudder-analytics.min.js | 57.71 KB (+0.92% 🔺) | 1.2 s (+0.92% 🔺) | 347 ms (+7.89% 🔺) | 1.6 s |
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.
size-limit report
Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
---|---|---|---|---|
dist/rudder-analytics.min.js | 57.69 KB (+0.88% 🔺) | 1.2 s (+0.88% 🔺) | 345 ms (-5.27% 🔽) | 1.5 s |
closing this as #167 addresses this |
Description of the change
Type of change
Related issues
Checklists
Development
Code review
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)