Installation Guide · WordPress
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.
Install on WordPress
WordPress
WordPress offers multiple ways to add custom scripts. We recommend using a plugin for safety, but the theme editor works too.
Method 1: Use a Plugin (Recommended)
This is the safest method. Your tracking script will survive theme changes and updates.
Prerequisites
- •WordPress admin access
- •Ability to install plugins
This is the main WordPress admin area. You can usually access it at yoursite.com/wp-admin
Both are free, trusted plugins with millions of installs. WPCode is the newer one with more features.
Tip: Look for the plugin by WPCode (formerly Insert Headers and Footers) — it's the most popular option.
After clicking Install Now, the button will change to Activate. Click it to enable the plugin.
The menu location depends on which plugin you installed. WPCode puts it under Code Snippets.
This is the section labeled 'Header' or 'Scripts in Header'. Do NOT put it in the Body or Footer section.
<script async src="https://analytics.tradly.dev/tracker.js" data-server="https://analytics.tradly.dev" data-project="marketplace"></script>Your changes are live immediately. No need to clear any cache unless you're using a caching plugin.
Plugin method survives theme changes and WordPress updates.
Troubleshooting (3 common issues)
- →If you don't see the plugin menu, try refreshing the admin page
- →Some caching plugins (WP Rocket, W3 Total Cache) may need their cache cleared after adding the script
- →If you're using a CDN like Cloudflare, the script should still work — no purge needed
Method 2: Theme Editor (Direct)
Edit your theme files directly. Only recommended if you're comfortable editing code.
Prerequisites
- •WordPress admin access
- •A child theme (recommended) or a theme you won't update
This is under the Appearance menu in the left sidebar of your WordPress dashboard.
Warning: Editing theme files directly can break your site if done incorrectly. Always use a child theme.
This file contains the <head> section of your site. It may also be called "header.php" in the file list.
<head> tagScroll through the file until you see the <head> tag. It's usually near the top of the file.
Tip: Use Cmd+F (Mac) or Ctrl+F (Windows) to search for <head>
<head>Don't replace anything — just add a new line and paste. The script should be one of the first things inside <head>.
<script async src="https://analytics.tradly.dev/tracker.js" data-server="https://analytics.tradly.dev" data-project="marketplace"></script>The button is at the bottom of the editor. Wait for the "File edited successfully" message.
Troubleshooting (3 common issues)
- →If you get a permission error, your hosting may block theme editing — use the plugin method instead
- →If the file reverts after updating, your host may have file permissions set to read-only
- →After a theme update, you'll need to re-add the script (unless you're using a child theme)
Need help? Contact support@tradly.dev or check our FAQ.
Last updated: January 2025