How to use CookiePopup in Shopify
How to insert a script in Shopify header file
If you want to add a custom script to the header of your Shopify store, you can follow these steps:
- Log in to your Shopify account and go to the Online Store > Themes section.
- Find the theme you want to edit and click the "Actions" button on the right-hand side.
- Select "Edit code" from the dropdown menu.
- In the left-hand sidebar, click on the "theme.liquid" file under the "Layout" folder.
- Find the </head> tag in the theme.liquid file. This is where you will insert your script.
-
If your site is based in europe use this script you need on your page:
<script src="https://europe.cookiepopup.com/cookiepopup.js" defer></script>
<script src="https://usa.cookiepopup.com/cookiepopup.js" defer></script>
- Paste your script code just before the </head> tag.
- Click the "Save" button to save your changes.
Note: It's important to be careful when editing the theme.liquid file as any errors or typos in your code can cause issues with your website. Make sure to backup your website before making any changes to your website files.