增加adjust web sdk
All checks were successful
site-dist-deploy / build-and-deploy (push) Successful in 1m41s

This commit is contained in:
speakeloudest 2026-04-04 03:23:19 +03:00
parent d629b360a0
commit 5a0f82704d

View File

@ -9,7 +9,7 @@ class AdjustUtil {
private static instance: AdjustUtil
private isInitialized: boolean = false
private appToken: string = 'vnxcjw75xyww'
private environment: 'production' | 'sandbox' = 'production'
private environment: 'production' | 'sandbox' = 'sandbox'
// Adjust 事件令牌映射表(请在此处替换为真实的 6 位令牌)
public static readonly EVENT_TOKENS = {
@ -61,7 +61,7 @@ class AdjustUtil {
* @param baseUrl Adjust 'https://hifastvpn.go.link'
* @param defaultAdjT adj_t '1xf6e7ru'
*/
public getDecoratedLink(baseUrl: string = 'https://hifastvpn.go.link', defaultAdjT: string = '1xf6e7ru'): string {
public getDecoratedLink(baseUrl: string = 'https://hifastvpn.go.link/8KzXY', defaultAdjT: string = '1xf6e7ru'): string {
const currentParams = new URLSearchParams(window.location.search || window.location.hash.split('?')[1] || '')
const baseParams = new URLSearchParams()
@ -77,7 +77,7 @@ class AdjustUtil {
baseParams.set(key, value)
}
})
// https://hifastvpn.go.link/8KzXY
const finalQuery = baseParams.toString()
return `${baseUrl}${baseUrl.includes('?') ? '&' : '?'}${finalQuery}`
}