Adding Tracking & Analytics Code
Your portal lets you add custom code directly to your website — no developer needed. This is how you connect Google Analytics, Meta Pixel, Hotjar, or any other tracking tool.
How to Add Code
- Log in to your portal at tradesite.ai/portal
- Scroll down to the Custom Code Injection section
- Paste your code in the appropriate field
- Click Save
Changes take effect immediately — no redeploy required.
Head Code vs Body Code
Head Code is injected into the <head> section of your website. Use this for:
- Google Analytics (GA4)
- Google Tag Manager
- Meta Pixel (base code)
- Any scripts or tags that need to load early
Body Code is injected near the end of the <body> section. Use this for:
- Live chat widgets (e.g., Tidio, Crisp)
- Any scripts that should load after the page content
Example: Adding Google Analytics
- Go to analytics.google.com and create a property for your site
- Copy the GA4 tracking snippet (it starts with
<script async src="https://www.googletagmanager.com/...">) - Paste it into the Head Code field in your portal
- Click Save
Example: Adding Meta Pixel
- Go to your Meta Business Manager and navigate to Events Manager
- Create a Pixel and copy the base code snippet
- Paste it into the Head Code field in your portal
- Click Save
Example: Adding Google Tag Manager
- Create a GTM account and container at tagmanager.google.com
- Copy the Head snippet and paste it into the Head Code field
- Copy the Body snippet and paste it into the Body Code field
- Click Save