[SURF-1836] feat(tag): support custom-domain script attribute - #72
Open
0xgautam wants to merge 1 commit into
Open
[SURF-1836] feat(tag): support custom-domain script attribute#720xgautam wants to merge 1 commit into
0xgautam wants to merge 1 commit into
Conversation
0xgautam
marked this pull request as ready for review
August 19, 2026 07:17
|
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.
Problem
The Surface tag hard-codes
forms.withsurface.comfor lead identification, journey tracking,external-form events, and open-trigger lookups. Environments whose forms are served from a
verified custom domain therefore still send tag traffic to the default Surface hostname, and
custom-domain iframes are not part of the tag's postMessage allowlist.
Changes
data-custom-domain="demo.example.com"script attribute.falls back to the current defaults for absent or invalid values.
through
https://<custom-domain>/api/v1.existing Surface origins.
SurfaceExternalForm({ serverBaseUrl })override.surface_tag.jsandsurface_embed_v1.js.Client usage
Without the attribute, existing integrations continue to use
https://forms.withsurface.com.Validation
pnpm typecheckpnpm test— 25/25 testspnpm test:unit— 6/6 testspnpm buildgit diff --check