๐ 1. Open Your Shopify Theme Code
To insert a script into your website header, youโll need to access your theme files.
Log in to your Shopify Dashboard.
In the left menu, go to Online Store โ Themes.
On your active theme, click Actions โ Edit Code.
This gives you safe access to your theme files without affecting your store design.
๐ง 2. Add the Script Inside the <head>
Once youโre inside the code editor:
In the left sidebar, open the layout folder.
Click theme.liquid.
Look for the <head> section. It will look something like:
<head>...</head>Paste the script we provided you into this area, for example:
<head><!-- Paste the script we provided you into this section --></head>Click Save in the top-right corner.
Thatโs it โ your script is now active on all pages of your store.
๐ 3. Setup Complete!
Your script is now installed!
If you need help or would like us to verify the installation, feel free to contact our support team at [email protected] ๐
๐ ๏ธ Support
If your theme removes custom script attributes (such as data-id or data-domain) โ this can happen on some Shopify themes or custom setups โ you can use this alternative method to ensure everything is preserved:
<script>
(function () {
var s = document.createElement('script');
s.src = 'https://analitas.com/script.js';
s.defer = true;
s.setAttribute('data-id', 'xxxx');
s.setAttribute('data-domain', 'site.com');
document.head.appendChild(s);
})();
</script>
This method dynamically loads the script and prevents Shopify or third-party apps from stripping the required attributes.
If the issue continues, send us a message at [email protected] and weโll help you as soon as possible.

