Include EU Cookie Consent in your Shopify Theme in 3 simple steps for FREE

July 08, 2019 2 min read

With the EU data protection regulations coming into play, a lot of Shopify merchants are re-looking at their Privacy and Cookie Policies. It’s important to keep your website visitors up to date with the policies in the clearest way you possibly can.

Here, we will introduce a very simple way how you can easily create a very personalized cookie consent in four steps:

  1. Create and style the cookie consent without programming on 
  2. Create a snippet for the cookie consent code
  3. Make a minor change in your theme.liquid file

1 Create and style the cookie consent

There are a couple of tools available online to create a personalized cookie content. A good one is which provides many choices for creating and styling. Basically you need to fill in a couple form fields with your individual text, links, colors and the HTML code is created automatically. In the next step, this code has to be integrated into your theme.

2 Create a snippet with the cookie consent code

In this step you need to create a new file in your theme and copy/paste the code from the previous step:

  • Open your theme editor in Shopify Admin by navigating to
    Online Store → Themes → Actions → Customize Code.
  • In the left pane go to the snippets section, create a new snippet, name it cookie-consent
  • copy/paste the code and save the snippet

3 Make a minor change to theme.liquid

Finally, you need make the cookie consent visible to website visitors on whatever page they visit first:

  • In the left pane click in the theme file
  • find the line with the code <\head>
  • Insert e new line above the <\head> Tag and copy/paste {% include cookie-consent%}
  • Save the file and exit the theme editor
Done! Now reload your homepage and you will see the cookie consent.