...
Code Block |
---|
EventData = {
category: 'AdConsent',
action: '',
label: '',
value: '',
nonInteraction: true
}COPY |
EventData.action
The consent region of this event:
...
User interface events
'GuiShow'
- User interface is open. This does not include the USP notice link.‘GuiSubmit'GuiSubmit'
- User submits it its settings, the following consent event will show the users user’s choice.
Consent events
'FullConsent'
- Vendors have full consent'PublisherFullConsent'
- Publisher has full consent'PartialConsent'
- Vendors have partial consent'PublisherPartialConsent'
- Publisher has partial consent'NoConsent'
- Vendors have no consent'PublisherNoConsent'
- Publisher has no consent
Others
'GooglePurposeOneMissing'
- Google does not have purpose 1 or vendor consent and will not deliver ads'Reconsider'
- The reconsider timeout triggered, see reconsiderConsent'Error...'
- Error events starting withError
and showing specific errors
...
The analytics functionality is used to observe and track users' behavior with the AdConsent consent management.
It support supports Google Analytics analytics.js and gtag.js by default. If you choose to use Google Analytics with custom names or an entirely different analytic system, you can pass a custom callback to convert analytic events to the format of your choice. See the examples section for use cases.
Scope
The function must be called before AdConsent start
, i.e. in the stub. Calls after AdConsent is started will be ignored.
GDRP analytic event flow
Code Block |
---|
User visits pageConsent given?Full consent?FullConsentPublisherFullConsent (optional)Partial consent?PartialConsentPublisherPartialConsent (optional)GooglePurposeOneMissing (optional)Reconsider?ReconsiderGuiShowGuiSubmitNoConsentPublisherNoConsent (optional)GooglePurposeOneMissingyesnoyesnoyesnoyes |
Drawio | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
CCPA analytic event flow
Note that GuiShow
can happen multiple times before a user decides to submit consent settings triggering GuiSubmit
. This means that GuiShow
in the CCPA region should not be used to measure the acceptance rate.
Code Block |
---|
User visits pageConsent given?Full consent?FullConsentNoConsentGooglePurposeOneMissingFullConsentClick privacy linkGuiShowPage action?GuiSubmityesnoyesnoyesno |
Insert new CCPA analytic flowchart
No privacy region analytic event flow
Code Block |
---|
User visits pageFullConsent |
Insert no GDPR region flowchart
Drawio | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
No privacy region analytic event flow
Drawio | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Examples
Google Analytics with automatic API detection
Requires analytics.js or gtag.js to be loaded and either the tag ga
or gtag
must be defined.
...