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: add redis support in shopify pixel for id stitching #3957

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

yashasvibajpai
Copy link
Member

What are the changes introduced in this PR?

Add redis support in shopify pixel for id stitching

What is the related Linear task?

Resolves INT-3056

Please explain the objectives of your changes below

Put down any required details on the broader aspect of your changes. If there are any dependent changes, mandatorily mention them here

Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?

N/A

Any new dependencies introduced with this change?

N/A

Any new generic utility introduced or modified. Please explain the changes.

N/A

Any technical or performance related pointers to consider with the change?

N/A

@coderabbitai review


Developer checklist

  • My code follows the style guidelines of this project

  • No breaking changes are being introduced.

  • All related docs linked with the PR?

  • All changes manually tested?

  • Any documentation changes needed with this change?

  • Is the PR limited to 10 file changes?

  • Is the PR limited to one linear task?

  • Are relevant unit and component test-cases added in new readability format?

Reviewer checklist

  • Is the type of change in the PR title appropriate as per the changes?

  • Verified that there are no credentials or confidential data exposed with the changes.

@yashasvibajpai yashasvibajpai self-assigned this Jan 3, 2025
@yashasvibajpai yashasvibajpai requested review from a team and sivashanmukh as code owners January 3, 2025 05:48
@devops-github-rudderstack
Copy link
Contributor

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 76.19048% with 10 lines in your changes missing coverage. Please review.

Project coverage is 90.73%. Comparing base (3c6e047) to head (0fbe91a).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
...pify/webhookTransformations/serverSideTransform.js 25.00% 4 Missing and 2 partials ⚠️
.../shopify/webhookTransformations/serverSideUtlis.js 40.00% 1 Missing and 2 partials ⚠️
src/v1/sources/shopify/transform.js 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3957      +/-   ##
===========================================
- Coverage    90.75%   90.73%   -0.02%     
===========================================
  Files          622      623       +1     
  Lines        32516    32556      +40     
  Branches      7718     7726       +8     
===========================================
+ Hits         29511    29541      +30     
- Misses        2749     2787      +38     
+ Partials       256      228      -28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@devops-github-rudderstack
Copy link
Contributor

Allure Test reports for this run are available at:

@devops-github-rudderstack
Copy link
Contributor

Allure Test reports for this run are available at:

@devops-github-rudderstack
Copy link
Contributor

Allure Test reports for this run are available at:

@devops-github-rudderstack
Copy link
Contributor

Allure Test reports for this run are available at:

@@ -125,6 +127,13 @@ const processEvent = async (inputEvent, metricMetadata) => {
const anonymousId = getAnonymousIdFromAttributes(event);
if (isDefinedAndNotNull(anonymousId)) {
message.setProperty('anonymousId', anonymousId);
} else {
// if anonymousId is not present in note_attributes or note_attributes is not present, query redis for anonymousId
const cartToken = getCartToken(event, message);
Copy link
Collaborator

@krishna2020 krishna2020 Jan 9, 2025

Choose a reason for hiding this comment

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

redis call should be made only if valid cartToken exists

const cartToken = event?.cart_token;
do we need getCartToken function ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated.
Keeping it in a separate function gives better readability to the functionality and also if any additional related logic comes up, can be abstracted to the function.

* chore: add campaign object support in web pixel events

* chore: add custom utm support
@devops-github-rudderstack
Copy link
Contributor

Allure Test reports for this run are available at:

@devops-github-rudderstack
Copy link
Contributor

Allure Test reports for this run are available at:

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
68.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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.

4 participants