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 Aug 22, 2023
1 parent 6b47607 commit adfdcbc
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,11 +21,12 @@
"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}\",\"gdprApplies\": $IF($CONSENT_METADATA(gdprApplies), true, false),\"consentType\": \"$CONSENT_METADATA(consentStringType)\",\"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}}}",
"sessionContext": "{\"schema\":\"iglu:dev.amp.snowplow/amp_session/jsonschema/1-0-0\",\"data\":{\"ampSessionId\":${sessionId},\"ampSessionIndex\":${sessionCount},\"sessionEngaged\":$IF(${sessionEngaged}, true, false),\"sessionCreationTimestamp\":${sessionTimestamp}$IF(${sessionEventTimestamp},`,\"lastSessionEventTimestamp\":${sessionEventTimestamp}`)}}",
"idContext": "{\"schema\":\"iglu:dev.amp.snowplow/amp_id/jsonschema/1-0-0\",\"data\":{\"ampClientId\":\"${ampVistorId}\",\"domainUserid\":\"${duid}\",\"userId\":\"${userId}\"}}",
"webPageContext": "{\"schema\":\"iglu:dev.amp.snowplow/amp_web_page/jsonschema/1-0-0\",\"data\":{\"ampPageViewId\":\"PAGE_VIEW_ID_64\"}}",
"contextsHead": "{\"schema\":\"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0\",\"data\":[${idContext},${sessionContext},$REPLACE(`${customContexts}`, `^,*(.+?),*$`, `$1,`)",
"contextsHead": "{\"schema\":\"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0\",\"data\":[${idContext},${sessionContext}$IF(${trackConsent},`,${consentContext}`),$REPLACE(`${customContexts}`, `^,*(.+?),*$`, `$1,`)",
"contextsTail": "${webPageContext}]}",
"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 adfdcbc

Please sign in to comment.