consent_purpose Function
Generates HTML attributes for an element to document buyer consent scope:
<script type="text/javascript" {{ consent_purpose('statistics') }}>
This function can be used in conjunction with Square Online’s cookie consent functionality to indicate what permissions from a buyer that script and its related cookies need.
Valid consent purposes are:
necessary: Cookies that are required for the site to functionmarketing: Cookies used in marketing functionalitystatistics: Cookies used to track buyer actions or site eventspreferences: Cookies used to store and apply the buyer’s preferences