feat: support custom sdkBaseUrl in google ads sdk#3002
Merged
maheshkutty merged 6 commits intoMay 22, 2026
Merged
Conversation
size-limit report 📦
|
saikumarrs
reviewed
May 15, 2026
saikumarrs
requested changes
May 15, 2026
maheshkutty
previously approved these changes
May 18, 2026
maheshkutty
previously approved these changes
May 21, 2026
saikumarrs
reviewed
May 21, 2026
saikumarrs
approved these changes
May 21, 2026
Add isValidURL utility with two-step validation (configurable pattern + strict URL_PATTERN) and apply it to GoogleAds sdkBaseUrl — stripping trailing slashes, rejecting invalid values with a descriptive error, and falling back to the default GTM domain when no value is provided.
Duplicates isValidURL (and URL_PATTERN) into analytics-js-integrations' local utils instead of depending on @rudderstack/analytics-js-common. The dependency was added in this PR to reuse the validator, but pulling in common couples integrations to every type-only edit in that package and forces an integrations rebuild + release. Reverts the package.json and tsconfig include changes. Tracked under SDK-4878 to carve out a frozen-API shared utilities package long-term.
546284d to
92d478f
Compare
maheshkutty
approved these changes
May 22, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




PR Description
Added support for loading Google Ads
gtag.jsfrom an optional custom base URL in JS web device mode. The integration now readsconfig.sdkBaseUrl, normalizes trailing slashes, falls back tohttps://www.googletagmanager.comwhen unset, and uses that base during SDK script load.Also added tests to verify:
sdkBaseUrlis absentsdkBaseUrlis providedLinear task (optional)
Resolves INT-6255
Cross Browser Tests
Please confirm you have tested for the following browsers:
Sanity Suite
Security