Skip to content

Conversation

dany-pellerin
Copy link
Contributor

@dany-pellerin dany-pellerin commented Aug 19, 2025

Why this change?

Refactoring the targeting configuration parameter from url to ref for better semantic clarity and consistency.

What is changed?

  • Service: Optable Web SDK
    • Areas:
      • Configuration system
      • Edge targeting functionality
      • Test suite

The change renames the additionalTargetingSignals.url parameter to additionalTargetingSignals.ref throughout the codebase. This affects:

  • Configuration type definitions in lib/config.ts
  • Edge targeting implementation in lib/edge/targeting.ts
  • All related test files (lib/config.test.ts, lib/edge/targeting.test.js)

The functionality remains identical - the parameter still captures the current page URL/reference for targeting purposes.

The change has been made an approved in edge already.

How to test the changes?

Automated tests:

  • Configuration tests in lib/config.test.ts verify the new ref parameter works correctly
  • Targeting tests in lib/edge/targeting.test.js ensure the ref parameter is properly included/excluded based on configuration
  • Tests cover all scenarios: ref: true, ref: false, ref: undefined, and when not provided

Manual testing:
The change is simple enough, well covered by tests.

Dependency changes?

  • No

@dany-pellerin dany-pellerin self-assigned this Aug 19, 2025
@dany-pellerin dany-pellerin added the type:feature New feature or request label Aug 19, 2025
@dany-pellerin dany-pellerin changed the title use ref instead of url for clarity use ref instead of url for clarity CU-86dxhr7zg Aug 19, 2025
@dany-pellerin dany-pellerin requested a review from zapo August 19, 2025 17:31
@dany-pellerin dany-pellerin merged commit e5ceb2b into master Aug 22, 2025
7 checks passed
@dany-pellerin dany-pellerin deleted the use-ref-instead-of-url branch August 22, 2025 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants