{{ cookie_consent title="Cookie choices" message="Optional scripts only run after you allow them." policy_url="/privacy-policy/"}} <section> ... </section>{{ /cookie_consent }}Categories#
Necessary cookies are always required. Optional categories default to:
preferencesanalyticsmarketing
Choose a different set with categories:
{{ cookie_consent categories="analytics,marketing" }} <section> ... </section>{{ /cookie_consent }}Category Labels#
Change labels and descriptions per category:
{{ cookie_consent analytics_label="Website analytics" analytics_description="Helps us understand which reviews people read." marketing_label="Embedded media" marketing_description="Allows third-party embeds and advertising tools."}} <section> ... </section>{{ /cookie_consent }}Inside {{ categories }}, {{ label }} and {{ description }} print those values.
Storage Key#
The default storage key is cookie-consent:v1.
Change it when consent categories or meaning change:
{{ cookie_consent storage_key="cookie-consent:v2" }} <section> ... </section>{{ /cookie_consent }}Changing the key makes visitors choose again.
Minimal Renderer#
The old non-paired tag still works:
{{ cookie_consent title="Cookie choices" }}Use the paired tag when you want full control over markup.