| 脚本 |
defaultConsent
|
运行时
consent.*
|
|---|---|---|
| Google Analytics |
Partial
<
ConsentState
>
(GCMv2)
|
consent
.
default
(state)
/
consent
.
update
(state)
|
| Google Tag Manager |
Partial
<
ConsentState
>
(GCMv2)
|
consent
.
default
(state)
/
consent
.
update
(state)
|
| Bing UET |
{ ad_storage }
|
consent
.
update
(
{
ad_storage
}
)
|
| Meta Pixel |
'granted' | 'denied'
|
consent
.
grant
()
/
consent
.
revoke
()
|
| TikTok Pixel |
'granted' | 'denied' | 'hold'
|
consent
.
grant
()
/
consent
.
revoke
()
/
consent
.
hold
()
|
| Matomo |
'required' | 'given' | 'not-required'
|
consent
.
give
()
/
consent
.
forget
()
(需要
defaultConsent: 'required'
或
'given'
)
|
| Mixpanel |
'opt-in' | 'opt-out'
|
consent
.
optIn
()
/
consent
.
optOut
()
|
| PostHog |
'opt-in' | 'opt-out'
|
consent
.
optIn
()
/
consent
.
optOut
()
|
| Clarity |
boolean | Record
<
string,
string
>
|
consent
.
set
(value)
|