Installation Guide

    How to Add Agent Analytics to Your Website

    One script captures what visitors browse. That becomes memory your analytics can understand. And agents like Jack turn it into actions — recovery emails, demand segments, conversion insights.

    What You'll Need

    • Admin access to your website platform (WordPress, Shopify, etc.)
    • Your Tradly Analytics tracking script (copy it from below)
    • 2-3 minutes of your time

    What It Tracks

    1

    Browsing behavior

    Page views, product interactions, search queries, cart actions — everything a visitor does on your site

    2

    Intent signals

    High-intent exits, demand patterns, conversion friction — the signals that matter for growth

    3

    Agent context

    Memory that agents like Jack use to suggest recovery emails, demand segments, and conversion improvements

    Your Tracking Script

    Copy this code. You'll paste it into your platform's settings in the next step.

    Tracking Script
    <script async src="https://analytics.tradly.dev/tracker.js" data-server="https://analytics.tradly.dev" data-project="marketplace"></script>

    Where does this go? Inside the <head> section of your website. This is the same section where you find meta tags, title tags, and other scripts. The async attribute ensures it loads without slowing down your page.

    Choose Your Platform

    Find your platform below. Each guide has step-by-step instructions with screenshots-style descriptions of exactly where to click.

    Verify It's Working

    After adding the script, your browsing behavior starts flowing into memory. Here's how to confirm:

    1. 1

      Open your website in a browser

      Visit your site like a normal visitor. Use a fresh tab or incognito window to avoid cached versions.

    2. 2

      Open browser DevTools

      Press F12 or Cmd+Option+I (Mac). Click the Console tab.

    3. 3

      Type TradlyAnalytics and press Enter

      If the pixel is installed correctly, you'll see an object returned with your project details. If you get Uncaught ReferenceError, the script hasn't loaded yet — wait a few seconds and try again.

    4. 4

      Check the Network tab

      In DevTools, go to the Network tab, reload the page, and filter by analytics.tradly.dev. You should see a request to the analytics server — this confirms data is being sent.

    Common Issues

    Script not loading?

    Make sure the script is inside the <head> tag, not the <body>. Check for typos in the URL. Some ad blockers block analytics scripts — test in an incognito window with extensions disabled.

    Data not showing in dashboard?

    There can be a 5-15 minute delay in data processing. If it's been longer, verify the script is loading in DevTools Network tab. Make sure the data-project value matches your project name.

    My platform isn't listed?

    Any platform that lets you edit the <head> section works. Look for "Custom Code", "Code Injection", "Header Scripts", or "HTML Head" in your platform's settings.

    LLM & AI Context

    Machine-readable version of this documentation

    JSON-LD Structured Data

    Validate
    application/ld+json
    {
      "@context": "https://schema.org",
      "@type": "TechArticle",
      "name": "How to Add Agent Analytics to Your Website",
      "description": "One script captures what visitors browse. That becomes memory your analytics can understand. And agents like Jack turn it into actions — recovery emails, demand segments, conversion insights.",
      "url": "https://docs.tradly.dev/docs/installation",
      "author": {
        "@type": "Organization",
        "name": "Tradly",
        "url": "https://tradly.dev"
      },
      "publisher": {
        "@type": "Organization",
        "name": "Tradly",
        "url": "https://tradly.dev"
      },
      "datePublished": "2025-01-01",
      "dateModified": "2025-01-01",
      "mainEntityOfPage": {
        "@type": "WebPage",
        "@id": "https://docs.tradly.dev/docs/installation"
      },
      "about": {
        "@type": "SoftwareApplication",
        "name": "Tradly Analytics",
        "url": "https://analytics.tradly.dev",
        "applicationCategory": "Analytics"
      },
      "mentions": [
        {
          "@type": "SoftwareApplication",
          "name": "WordPress"
        },
        {
          "@type": "SoftwareApplication",
          "name": "Shopify"
        },
        {
          "@type": "SoftwareApplication",
          "name": "Wix"
        },
        {
          "@type": "SoftwareApplication",
          "name": "Squarespace"
        },
        {
          "@type": "SoftwareApplication",
          "name": "Webflow"
        },
        {
          "@type": "SoftwareApplication",
          "name": "Next.js"
        },
        {
          "@type": "SoftwareApplication",
          "name": "React"
        },
        {
          "@type": "SoftwareApplication",
          "name": "Vue.js"
        },
        {
          "@type": "SoftwareApplication",
          "name": "Gatsby"
        },
        {
          "@type": "SoftwareApplication",
          "name": "Flutter Web"
        }
      ]
    }

    Add this to your page's <head> as <script type="application/ld+json"> for better search engine understanding.

    LLM Context (Markdown)

    # How to Add Agent Analytics to Your Website
    
    One script captures what visitors browse. That becomes memory your analytics can understand. And agents like Jack turn it into actions — recovery emails, demand segments, conversion insights.
    
    ## How It Works
    1. **Pixel** captures browsing behavior (page views, searches, cart actions)
    2. **Memory** stores this as structured intent and behavior data
    3. **Analytics** processes memory into insights (demand signals, friction points)
    4. **Agents** like Jack use memory to suggest actions (recovery emails, segments, improvements)
    
    ## Script Tag
    ```html
    <script async src="https://analytics.tradly.dev/tracker.js" data-server="https://analytics.tradly.dev" data-project="marketplace"></script>
    ```
    
    ## Where to Place
    Inside the `<head>` section of your HTML document.
    
    ## Supported Platforms
    - **WordPress**: WPCode plugin (Code Snippets → Header & Footer) or Theme Editor (header.php)
    - **Shopify**: Online Store → Themes → Edit code → Layout → theme.liquid
    - **Wix**: Settings → Custom Code → Add Code → Head section (requires Premium plan)
    - **Squarespace**: Settings → Advanced → Code Injection → Header
    - **Webflow**: Project Settings → Custom Code → Head Code
    - **Next.js**: Use `<Script>` component from `next/script` with `strategy="afterInteractive"`
    - **React (CRA)**: public/index.html → <head>
    - **React (Vite)**: index.html (project root) → <head>
    - **Vue.js**: public/index.html → <head>
    - **Gatsby**: gatsby-ssr.js → onRenderBody → setHeadComponents
    - **Flutter Web**: web/index.html → <head>
    - **Plain HTML**: Add directly to <head> in each HTML file
    
    ## What the Pixel Captures
    - Page views and product interactions
    - Search queries and conversation intent
    - Cart actions and checkout friction
    - Campaign and AI referral sources
    
    ## Script Attributes
    - `async`: Loads without blocking page rendering
    - `data-server`: Analytics endpoint URL
    - `data-project`: Your project identifier
    
    ## Verification
    1. Open browser DevTools (F12)
    2. Go to Console tab
    3. Type `TradlyAnalytics` and press Enter
    4. If an object is returned, the pixel is active
    5. Check Network tab for requests to analytics.tradly.dev
    

    Copy this markdown for use in LLM prompts, AI assistants, or context windows. Also available at llm.tradly.app

    MCP Server

    mcp.tradly.app

    Access Tradly Analytics data through the Model Context Protocol. Connect your AI assistant to query analytics, retrieve events, and manage your workspace programmatically.

    Need help? Contact support@tradly.dev or check our FAQ.

    Last updated: January 2025