Skip to content

fix(ga4): add validation for empty object, arrays, and string values from params - #2315

Merged
mihir-4116 merged 5 commits into
developfrom
fix/ga4-empty-params
Jul 19, 2023
Merged

mihir-4116 merged 5 commits into
developfrom
fix/ga4-empty-params

Conversation

@mihir-4116

Copy link
Copy Markdown
Contributor

Description of the change

  • Added validation to remove empty object, arrays, and string values from params as GA4 does not accept parameter values as objects or arrays.
  • Included unit test cases to ensure the correctness of the implemented validation.
  • Performed minor refactoring in the transform.js file for improved code organization and readability

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

@mihir-4116
mihir-4116 requested review from krishna2020 and utsabc June 28, 2023 12:09
@mihir-4116 mihir-4116 self-assigned this Jun 28, 2023
@mihir-4116
mihir-4116 requested review from a team as code owners June 28, 2023 12:09
@codecov

codecov Bot commented Jun 28, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (99b3c87) 87.40% compared to head (61b389d) 87.40%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2315   +/-   ##
========================================
  Coverage    87.40%   87.40%           
========================================
  Files          489      489           
  Lines        25515    25524    +9     
  Branches      6322     6324    +2     
========================================
+ Hits         22301    22310    +9     
  Misses        2854     2854           
  Partials       360      360           
Impacted Files Coverage Δ
src/v0/destinations/ga4/transform.js 92.19% <100.00%> (-0.37%) ⬇️
src/v0/destinations/ga4/utils.js 96.80% <100.00%> (+0.46%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mihir-4116
mihir-4116 requested a review from Gauravudia July 18, 2023 06:51
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@mihir-4116
mihir-4116 merged commit a66810a into develop Jul 19, 2023
@devops-github-rudderstack
devops-github-rudderstack deleted the fix/ga4-empty-params branch October 20, 2023 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants