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

  1. Log in to your portal at tradesite.ai/portal
  2. Scroll down to the Custom Code Injection section
  3. Paste your code in the appropriate field
  4. 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

  1. Go to analytics.google.com and create a property for your site
  2. Copy the GA4 tracking snippet (it starts with <script async src="https://www.googletagmanager.com/...">)
  3. Paste it into the Head Code field in your portal
  4. Click Save

Example: Adding Meta Pixel

  1. Go to your Meta Business Manager and navigate to Events Manager
  2. Create a Pixel and copy the base code snippet
  3. Paste it into the Head Code field in your portal
  4. Click Save

Example: Adding Google Tag Manager

  1. Create a GTM account and container at tagmanager.google.com
  2. Copy the Head snippet and paste it into the Head Code field
  3. Copy the Body snippet and paste it into the Body Code field
  4. Click Save