Skip to content

Commit

Permalink
Add optional consent context (closes #17)
Browse files Browse the repository at this point in the history
  • Loading branch information
igneel64 committed Oct 4, 2022
1 parent 372d562 commit 2025b13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extensions/amp-analytics/0.1/vendors/snowplow_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
"ampVistorId": "CLIENT_ID(_sp_ampid)",
"duid": "$IF($SUBSTR(QUERY_PARAM(_sp),0,36), $SUBSTR(QUERY_PARAM(_sp),0,36), $IF(LINKER_PARAM(sp_amp_linker,_sp_duid), LINKER_PARAM(sp_amp_linker,_sp_duid), COOKIE(_sp_duid)))",
"nullString": "null",
"consentContext": "{\"schema\":\"iglu:dev.amp.snowplow/amp_consent/jsonschema/1-0-0\",\"data\":{\"consentState\":\"${consentState}\",\"consentString\":\"${consentString}\",\"gdprApplies\": $IF($CONSENT_METADATA(gdprApplies), true, false),\"consentType\": \"$CONSENT_METADATA(consentStringType)\",\"additionalConsentString\": \"$CONSENT_METADATA(additionalConsent)\",\"purposeOne\":$IF($CONSENT_METADATA(purposeOne), true, false)}}",
"customEventTemplate": "{\"schema\":\"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0\",\"data\":{\"schema\":\"iglu:${customEventSchemaVendor}/${customEventSchemaName}/jsonschema/${customEventSchemaVersion}\",\"data\":${customEventSchemaData}}}",
"contextsHead": "{\"schema\":\"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0\",\"data\":[{\"schema\":\"iglu:dev.amp.snowplow/amp_id/jsonschema/1-0-0\",\"data\":{\"ampClientId\":\"${ampVistorId}\", \"domainUserid\": \"${duid}\", \"userId\": \"${userId}\"}},$REPLACE(`${customContexts}`, `^,*(.+?),*$`, `$1,`)",
"contextsHead": "{\"schema\":\"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0\",\"data\":[{\"schema\":\"iglu:dev.amp.snowplow/amp_id/jsonschema/1-0-0\",\"data\":{\"ampClientId\":\"${ampVistorId}\", \"domainUserid\": \"${duid}\", \"userId\": \"${userId}\"}},$IF(${trackConsent},`${consentContext}`),$REPLACE(`${customContexts}`, `^,*(.+?),*$`, `$1,`)",
"contextsTail": "{\"schema\":\"iglu:dev.amp.snowplow/amp_web_page/jsonschema/1-0-0\",\"data\":{\"ampPageViewId\":\"PAGE_VIEW_ID_64\"}}]}",
"ampPagePingTemplate": "{\"schema\":\"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0\",\"data\":{\"schema\":\"iglu:dev.amp.snowplow/amp_page_ping/jsonschema/1-0-0\",\"data\":{\"scrollLeft\":${scrollLeft},\"scrollWidth\":${scrollWidth},\"viewportWidth\":${viewportWidth},\"scrollTop\":${scrollTop},\"scrollHeight\":${scrollHeight},\"viewportHeight\":${viewportHeight},\"totalEngagedTime\":${totalEngagedTime}}}}"
},
Expand Down

0 comments on commit 2025b13

Please sign in to comment.