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

chore: add campaign object support in web pixel events #3973

Conversation

yashasvibajpai
Copy link
Member

What are the changes introduced in this PR?

Add campaign object support in web pixel events similar to the campaign object in JS SDK

What is the related Linear task?

Resolves INT-3028

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.

@devops-github-rudderstack
Copy link
Contributor

Allure Test reports for this run are available at:

Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (chore.redis.support.shopify.pixel@e285d8b). Learn more about missing BASE report.

Additional details and impacted files
@@                         Coverage Diff                          @@
##             chore.redis.support.shopify.pixel    #3973   +/-   ##
====================================================================
  Coverage                                     ?   90.74%           
====================================================================
  Files                                        ?      623           
  Lines                                        ?    32555           
  Branches                                     ?     7728           
====================================================================
  Hits                                         ?    29541           
  Misses                                       ?     2755           
  Partials                                     ?      259           

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

Copy link
Member

Choose a reason for hiding this comment

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

While these are the standard parameters, there can be custom UTM values like utm_xyz. We should support them too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@saikumarrs can they be transformed in similar way by just removing utm_ prefix ?

Copy link
Member

Choose a reason for hiding this comment

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

Yes.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Got it. Let me get this too

Copy link
Member Author

Choose a reason for hiding this comment

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

addressed @saikumarrs

@devops-github-rudderstack
Copy link
Contributor

Allure Test reports for this run are available at:

@yashasvibajpai yashasvibajpai merged commit 7f57e45 into chore.redis.support.shopify.pixel Jan 9, 2025
22 checks passed
@yashasvibajpai yashasvibajpai deleted the chore.add.campaign.object.pixel branch January 9, 2025 15:30
const campaignObjectSourceKeys = campaignObjectMappings.flatMap(
(mapping) => mapping.sourceKeys,
);
url.searchParams.forEach((value, key) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it not forEach((key, value) ?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, campaignParams[key] will get campaign { } keys, and value will be the utm values in the href

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