Tracking
Shopify cookie consent
Wire a cookie banner in Shopify to analytics: count without cookies until the answer, and pass the saved answer on every page.
Updated
In Shopify, pass your banner's answer to the tag from a script in your theme, on every page. Until there's an answer, nextanalytica counts without cookies.
How does it look?
<script>
const saved = localStorage.getItem("consent"); // "yes", "no" or null
if (saved !== null) window.nextanalytica?.consent(saved === "yes");
</script>Your banner saves the answer and calls window.nextanalytica.consent(true) or consent(false) when the visitor clicks.
What can you ask your agent?
- "How many visitors this week came before answering the banner?"