Skip to content

Instantly share code, notes, and snippets.

View dansutherland-engineer's full-sized avatar

Dan Sutherland dansutherland-engineer

View GitHub Profile
{% assign randomNumber = "now" | date: "%N" | modulo: 100 %}
{% if randomNumber > 50 %}
{% render 'snippet-B' %}
<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'ABTest',
'variant': 'B'
@dansutherland-engineer
dansutherland-engineer / cookie-banner.liquid
Last active September 12, 2024 20:32
Shopify basic cookie consent banner using the Customer Privacy API