Skip to content
Open
Show file tree
Hide file tree
Changes from 106 commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
4a333ae
poc
tyiuhc Oct 29, 2025
ac9297d
simplify
tyiuhc Oct 29, 2025
1707e1c
simplify
tyiuhc Oct 29, 2025
ed3151a
fix
tyiuhc Oct 31, 2025
1edb608
fix
tyiuhc Nov 3, 2025
7b3ecc3
Merge branch 'main' into web/subdomain-redirect-poc
tyiuhc Nov 6, 2025
e030327
fix for special case domains
tyiuhc Nov 6, 2025
0c5ead6
fix tests
tyiuhc Nov 6, 2025
0a45d29
fix lint
tyiuhc Nov 6, 2025
0bc57bf
Merge branch 'main' into web/subdomain-redirect-poc
tyiuhc Nov 6, 2025
d4bdd83
Merge branch 'main' into web/subdomain-redirect-poc
tyiuhc Nov 24, 2025
2b64028
Merge branch 'main' into web/subdomain-redirect-poc
tyiuhc Nov 24, 2025
cafc03c
fix marketing cookie logic
tyiuhc Dec 8, 2025
39ae94e
feat: support new page triggers - element appeared, element visible, …
tyiuhc Dec 16, 2025
ca355c0
add comment
tyiuhc Dec 18, 2025
49b73de
mutation manager should directly update state
tyiuhc Dec 23, 2025
6b9935c
add try-catch for initialization
tyiuhc Dec 23, 2025
d0c9aeb
feat: add user_interaction trigger (#243)
tyiuhc Dec 23, 2025
9a16d83
feat: add exit_intent trigger (#246)
tyiuhc Dec 23, 2025
f910b80
feat: add analytics_event trigger (#245)
tyiuhc Dec 23, 2025
212086b
feat: add time_on_page trigger (#242)
tyiuhc Dec 23, 2025
84b011e
feat: add scolled_to trigger (#244)
tyiuhc Dec 23, 2025
e42d012
update per comments
tyiuhc Dec 23, 2025
0d15f3f
fix delimiter and refactor delegation
tyiuhc Dec 24, 2025
62e2e4a
delimiter fix, fix hover checks
tyiuhc Dec 24, 2025
6f79133
simplify clean up logic
tyiuhc Dec 25, 2025
9e935bc
reduce scope of applyVariants to experiments relevant to the trigger …
tyiuhc Dec 25, 2025
c8abd74
refactor setupPageObjectSubscriptions
tyiuhc Dec 25, 2025
d0be2f9
fix test mocking, fix lint
tyiuhc Dec 26, 2025
8ee7c62
refactor test mocks
tyiuhc Dec 26, 2025
1360c8d
update element_appeared messaging
tyiuhc Dec 26, 2025
e25d3b7
catch querySelectorAll error
tyiuhc Dec 26, 2025
3bf52ce
evaluation trigger_value for conditions
tyiuhc Dec 29, 2025
ae805d0
reset states upon url change
tyiuhc Dec 29, 2025
c18ed81
fix offset logic
tyiuhc Dec 29, 2025
06b4821
fix hover logic
tyiuhc Dec 29, 2025
5628a40
add comment
tyiuhc Dec 29, 2025
6942db7
update analytics_event props
tyiuhc Jan 2, 2026
7442bd0
persist manually triggered page objects
tyiuhc Jan 3, 2026
2d94113
factor out utils, early return for publishers if not required
tyiuhc Jan 5, 2026
8c3a3cb
nit: update util desc
tyiuhc Jan 5, 2026
c5da5a5
update active to toggleManualPageObject
tyiuhc Jan 6, 2026
b3aba31
make trackEvent private
tyiuhc Jan 6, 2026
8a6328b
simplify comments
tyiuhc Jan 6, 2026
1449576
fix toggleManualPageObject
tyiuhc Jan 6, 2026
4f1c5ff
fix scrolled_to percentage when scroll height is 0
tyiuhc Jan 6, 2026
5f7dddc
Merge branch 'main' into web/page-triggers-1
tyiuhc Jan 6, 2026
0d77c6c
persist analytics_event state
tyiuhc Jan 8, 2026
890e7b4
update click with minThreshold
tyiuhc Jan 14, 2026
cf658e6
fix exit_intent timeout logic
tyiuhc Jan 15, 2026
9489888
fix handleinject scoping
tyiuhc Jan 15, 2026
0dbed0d
Merge branch 'main' into web/page-triggers-1
tyiuhc Jan 15, 2026
0680053
only apply variant actions if page objects are updated
tyiuhc Feb 5, 2026
c0164d9
fix lint
tyiuhc Feb 5, 2026
422ad78
scope preview variants to trigger
tyiuhc Feb 9, 2026
2561c8a
do not trigger url_change when url is the same
tyiuhc Feb 9, 2026
c60f40d
use globalScope.setTimeout
tyiuhc Feb 9, 2026
6db28c8
Merge branch 'main' into web/page-triggers-1
tyiuhc Feb 11, 2026
bfdd135
Merge branch 'main' into web/subdomain-redirect-poc
tyiuhc Feb 11, 2026
7ac74ea
fix preview filtering
tyiuhc Feb 12, 2026
bb807d4
buffer events before initialization completes
tyiuhc Feb 12, 2026
4eabeaf
fix itest
tyiuhc Feb 12, 2026
a4fe72c
fix preview for event tracked
tyiuhc Feb 12, 2026
8a00071
fix: use querySelectorAll to check all matched elements
tyiuhc Mar 3, 2026
5c3fccf
Merge branch 'main' into web/page-triggers-1
tyiuhc Mar 3, 2026
88e19f7
Merge branch 'web/page-triggers-1' into web/subdomain-redirect-poc
tyiuhc Mar 5, 2026
432eba1
Merge branch 'main' into web/subdomain-redirect-poc
tyiuhc Mar 5, 2026
407c422
merge main
tyiuhc Mar 11, 2026
7267171
Merge branch 'main' into web/subdomain-redirect-poc
tyiuhc Mar 19, 2026
e384d41
Merge branch 'main' into web/subdomain-redirect-poc
tyiuhc Mar 20, 2026
e1f84cc
Merge branch 'main' into web/subdomain-redirect-poc
ansonchen2 Mar 26, 2026
2b16d3a
Merge branch 'main' into web/subdomain-redirect-poc
ansonchen2 Apr 2, 2026
df3f4e9
Merge branch 'main' into web/subdomain-redirect-poc
ansonchen2 Apr 2, 2026
6deb5d2
Merge branch 'main' into web/subdomain-redirect-poc
ansonchen2 Apr 2, 2026
0d9f91f
Merge branch 'main' into web/subdomain-redirect-poc
ansonchen2 Apr 10, 2026
bea05de
Merge branch 'main' into web/subdomain-redirect-poc
tyiuhc Apr 13, 2026
3759d4a
Merge branch 'web/subdomain-redirect-poc' of github.com:amplitude/exp…
tyiuhc Apr 13, 2026
fa2498b
fix(subdomain): add await for storage (#307)
kwliou Apr 21, 2026
8c48da0
Merge branch 'main' into web/subdomain-redirect-poc
tyiuhc May 6, 2026
f9b78d5
Merge branch 'web/subdomain-redirect-poc' of github.com:amplitude/exp…
tyiuhc May 6, 2026
d977847
fix tests
tyiuhc May 6, 2026
42ced13
fix lint
tyiuhc May 6, 2026
a9015ee
Merge branch 'main' into web/subdomain-redirect-poc
tyiuhc May 6, 2026
a70fc95
Merge branch 'main' into web/subdomain-redirect-poc
tyiuhc May 14, 2026
5fef8be
add config and use cookie as fallback
tyiuhc May 19, 2026
0369e80
fix eTLD logic and tests
tyiuhc May 20, 2026
8f2ff01
fix merge
tyiuhc May 20, 2026
016853c
nit: update desc
tyiuhc May 20, 2026
5998caa
fix: await async applyVariants and fireStoredRedirectImpressions call…
tyiuhc May 20, 2026
4ad7e74
fix lint
tyiuhc May 20, 2026
2829700
fix: include impression data in url as fallback for cross-subdomain r…
tyiuhc May 20, 2026
8963f96
fix catch
tyiuhc May 20, 2026
20809cc
Merge branch 'main' into web/subdomain-redirect-poc
tyiuhc May 21, 2026
abaa7a0
fix lint
tyiuhc May 21, 2026
736291c
fix comment
tyiuhc May 21, 2026
0b7607a
Merge branch 'main' into web/subdomain-redirect-poc
tyiuhc May 26, 2026
ef45109
remove antiflicker after local var application
tyiuhc May 28, 2026
d4a7923
set defaults
tyiuhc Jun 4, 2026
d50f284
fix(experiment-tag): pre-register cleaned URL before replaceState to …
tyiuhc Jun 4, 2026
ce31466
feat(experiment-tag): enable url and cookie redirect encoding by default
tyiuhc Jun 4, 2026
16a9c66
chore: merge main into web/subdomain-redirect-poc and fix redirect te…
tyiuhc Jun 4, 2026
1c05706
Merge branch 'web/subdomain-redirect-poc' into web/subdomain-redirect…
tyiuhc Jun 4, 2026
403ffcc
fix debounce, get tld
tyiuhc Jun 4, 2026
a191943
Merge branch 'web/subdomain-redirect-poc' into web/subdomain-redirect…
tyiuhc Jun 4, 2026
9e6eeaa
rge branch 'main' into web/subdomain-redirect-default
tyiuhc Jun 11, 2026
083f79e
fix(experiment-tag): prevent anti-flicker CSS removal during redirect…
tyiuhc Jun 11, 2026
27bd6d0
fix(experiment-tag): use isRedirecting flag instead of never-resolvin…
tyiuhc Jun 11, 2026
c3a3878
fix(experiment-tag): keep anti-flicker during redirect in bootstrap
tyiuhc Jun 18, 2026
6c95b66
fix(experiment-tag): gate preview-path anti-flicker teardown on isRed…
tyiuhc Jun 18, 2026
1c6c166
Merge remote-tracking branch 'origin/main' into web/subdomain-redirec…
tyiuhc Jul 13, 2026
408eb8f
fix(spa-router): allow interceptor to navigate to external URLs (#353)
kwliou Jul 16, 2026
a7ac131
Merge branch 'main' into web/subdomain-redirect-default
tyiuhc Aug 24, 2026
6cdd9f3
Merge branch 'web/subdomain-redirect-default' of github.com:amplitude…
tyiuhc Aug 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/experiment-tag/src/experiment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,10 @@ export class DefaultWebExperimentClient implements WebExperimentClient {
return;
}
this.globalScope.location.replace(targetUrl);
// location.replace() queues navigation but JS continues — stall so applyVariants
// never resolves and removeAntiFlickerCss() is never called during the unload window.
// eslint-disable-next-line @typescript-eslint/no-empty-function
await new Promise(() => {});
Comment thread
cursor[bot] marked this conversation as resolved.
Outdated
}

private handleMutate(action, flagKey: string, variant: Variant) {
Expand Down
2 changes: 1 addition & 1 deletion packages/experiment-tag/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export interface WebExperimentConfig extends ExperimentConfig {
export const Defaults: WebExperimentConfig = {
useDefaultNavigationHandler: true,
redirectConfig: {
encodeRedirectInUrl: false,
encodeRedirectInUrl: true,
encodeRedirectInCookie: true,
},
};
Expand Down
Loading