Installing Trakg on Shopify
To integrate Trakg with your Shopify store:Option 1: Add to Theme (Recommended)
- Go to your Shopify Admin panel
- Click Online Store → Themes → Actions → Edit Code
- In the left sidebar, open
layout/theme.liquid
- Paste the following script just before the closing
</body>
tag:
🔁 Replace YOUR_ID_GIVEN
with your actual Site ID from your Trakg Dashboard
- Click Save
Option 2: Use a Shopify App (If theme editing is restricted)
You can use apps like:- Custom JavaScript & CSS by Voidworks
- ScriptTag Manager
Best Practices
- ✅ Always use the
defer
attribute for non-blocking performance - ✅ Insert the script before the closing
</body>
tag - ✅ No need to change your forms or use any wrappers
- ✅ Trakg works with all native HTML forms and most Shopify form apps (e.g., Contact Form, Klaviyo)
You’re Ready!
Once the script is installed:- Trakg tracks all user interactions and form field activity
- Captures partially filled form data without requiring submission
- Shows real-time analytics in your Trakg Dashboard
- Helps recover abandoned leads and improve conversions