Install cookie widget
This guide is designed to help customers install our cookie widget on their Shopify based website. Follow these few simple steps to get up and running quickly.
Before following these steps, please be sure that you have:
- Added your website's URL (either during the signup process or in the settings page)
To install your widget, you'll need your cookie widget code snippet.
To find your code snippet, go to the Openli dashboard and select "Widgets" in the side menu. Click on the cookie widget you previously created and copy the code.
It will look like this:
Notice that the value for
widgetPublicKeywill be different in your code snippet
To insert the code snippet on your page, go to your Shopify dashboard and select "Online store" in the side menu. From the dropdown menu select "Themes".
To add custom code to your theme, you must select "Edit code" from the actions menu:
Select Edit code from the dropdown menu
You'll now enter Shopify's code editing interface.
To correctly install the cookie widget, you must enter the widget code snippet in the file name "theme.liquid".
Select "theme.liquid" from the list of files in the editor:
The editor screen when "theme.liquid" is selected
The cookie widget code snippet will need to go right before the closing <body>-tag of your code. Navigate to the bottom of the code and insert your code snippet.
The highlighted code is your cookie widget code snippet.
Remember to save once you've added the code snippet.
Finally it is important that you don't forget to block any non-necessary cookies. It is extremely important to do this as you would otherwise be setting cookies before you collect consent. You can block cookies in two different ways. Either manually or via GTM if you use that to set the cookies. Guides can be found here for GTM: Blocking Cookies with GTM And here for manual blocking: Blocking Cookies Manually
Congratulations on completing your first step towards collecting compliant cookie consent. Pad your self on the back and know that our mascot Li is proud of you.