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

Adobe Analytics #250

Merged
merged 16 commits into from
Jun 11, 2021
Merged

Conversation

ruchiramoitra
Copy link
Contributor

@ruchiramoitra ruchiramoitra commented Jun 1, 2021

Description of the change

Description here

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

Fix #1

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers mentioned in a comment
  • Changes have been reviewed by at least one other engineer
  • Issue from task tracker has a link to this pull request

This change is Reviewable

@ruchiramoitra ruchiramoitra requested a review from arnab-p June 1, 2021 14:24
@ruchiramoitra ruchiramoitra changed the title initial commit initial commit adobe Jun 3, 2021
@arnab-p arnab-p changed the title initial commit adobe Adobe Analytics Jun 3, 2021
Comment on lines +73 to +75
"Adobe Analytics": "ADOBE_ANALYITCS",
ADOBE_ANALYTICS: "ADOBE_ANALYTICS",
AdobeAnalytics: "ADOBE_ANALYTICS",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's support all lowercases as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

* @param {} return true or false accordingly if value is empty
*/

function isEmpty(value) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not mix ES5 and ES6 and fix on ES6.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

value === undefined ||
value === null ||
(typeof value === "object" && Object.keys(value).length === 0) ||
(typeof value === "string" && value.trim().length === 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we handle array as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,69 @@
/* eslint-disable no-param-reassign */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nice to move this file to a common util file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


// Begin heartbeat implementation

populatHeartbeat(rudderElement) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
populatHeartbeat(rudderElement) {
populateHeartbeat(rudderElement) {

typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

campaign = properties.campaign;
}
const channel = rudderElement.message.channel || properties.channel;
const { state, zip } = properties;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take from traits instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

const key = rudderProp.productMerchProperties.split(".");
// take the keys after products. and find the value in properties
const value = _.get(properties, key[1]);
if (value && value !== "undefined") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check similar implementations and figure out if we can move it to a util method

@ruchiramoitra ruchiramoitra merged commit 74fc650 into production-staging Jun 11, 2021
@akashrpo akashrpo deleted the adobe-analytics-dest-prod-staging branch March 5, 2022 10:24
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