Installation guide for Shopify stores.
Go to Online Store → Themes, click the ... button next to your active theme, select Edit code, open theme.liquid in the Layout folder, and add the script tag before </head>:
<script src="https://cdn.palaceanalytics.com/palace-tracker.js" data-website-id="your-website-id" data-auto-track="true" defer ></script>