Before you begin, ensure:
- You have WordPress admin access to monocubed.com
- You have FTP or file manager access
- You can access phpMyAdmin or database
Option A: Via WordPress Admin
1. Go to: https://www.monocubed.com/wp-admin/
2. Navigate to: Plugins → Add New → Upload Plugin
3. Choose: third-audience.zip
4. Click: Install Now
5. Click: Activate Plugin
Option B: Via FTP
1. Connect to FTP
2. Upload /third-audience/ folder to:
/wp-content/plugins/third-audience/
3. Go to WordPress Admin → Plugins
4. Click: Activate on "Third Audience"
After activation, you should see this notice:
🎉 Third Audience Activated Successfully
Auto-configuration completed:
✅ or ⚠️ REST API: [Status]
✅ or 🔒 Security Plugin: [Name if detected]
✅ Database: [Status]
🖥️ Server: [Type]
🐘 PHP: [Version]
✨ No server configuration needed!
Screenshot this notice and save it!
1. Go to: Settings → Third Audience → System Health
2. You should see a full environment report
Expected Results:
| Item | Expected |
|---|---|
| REST API Status | ✓ Accessible OR ⚠ Fallback Mode |
| Database Tables | ✓ All created |
| PHP Version | 7.4+ |
| Server Type | nginx/apache/litespeed |
1. Open phpMyAdmin
2. Select your WordPress database
3. Check for these tables:
Required Tables:
- wp_ta_bot_analytics (main tracking table)
- wp_ta_citation_alerts
- wp_ta_bot_patterns
4. Click on wp_ta_bot_analytics
5. Check Structure tab
6. Verify these columns exist:
- id
- bot_name
- page_url
- page_title
- referer
- search_query
- content_type ← IMPORTANT (new in 3.4.0)
- is_citation ← IMPORTANT
- traffic_type
- visited_at
If any column is missing, the auto-fixer will add it within 24 hours, or you can run:
ALTER TABLE wp_ta_bot_analytics
ADD COLUMN content_type varchar(50) DEFAULT 'html' AFTER traffic_type;
ALTER TABLE wp_ta_bot_analytics
ADD COLUMN is_citation tinyint(1) DEFAULT 0 AFTER cache_hit;Open terminal and run:
curl https://www.monocubed.com/wp-json/third-audience/v1/healthExpected Response (if REST API works):
{
"status": "healthy",
"version": "3.4.0",
"converter": "available",
"cache": "operational"
}If you get 403 or 404:
- REST API is blocked ✓ (Expected on some servers)
- Plugin will use AJAX fallback automatically
- Everything still works!
curl -X POST https://www.monocubed.com/wp-admin/admin-ajax.php \
-d "action=ta_health_check"Expected Response:
{
"success": true,
"data": {
"status": "healthy",
"version": "3.4.0",
"method": "ajax_fallback"
}
}This should ALWAYS work, even if REST API is blocked!
1. Go to: Settings → Third Audience → Headless Setup
2. Find: "API Key" field
3. Copy the key (looks like: abc123def456...)
4. Save this key - you'll need it!
# Replace YOUR_API_KEY with the actual key from Step 4.1
curl -X POST https://www.monocubed.com/wp-json/third-audience/v1/track-citation \
-H "Content-Type: application/json" \
-H "X-TA-Api-Key: YOUR_API_KEY" \
-d '{
"url": "/test-citation-rest",
"platform": "ChatGPT",
"referer": "https://chat.openai.com",
"search_query": "test query from REST API"
}'Expected Response (Success):
{
"success": true,
"message": "Citation tracked successfully",
"platform": "Chatgpt",
"url": "/test-citation-rest"
}If you get error 401:
- Check API key is correct
- Try regenerating API key in WordPress admin
If you get error 403:
- REST API is blocked
- Try AJAX fallback test (Step 4.3)
# Replace YOUR_API_KEY with the actual key
curl -X POST https://www.monocubed.com/wp-admin/admin-ajax.php \
-d "action=ta_track_citation" \
-d "api_key=YOUR_API_KEY" \
-d "url=/test-citation-ajax" \
-d "platform=Perplexity" \
-d "referer=https://www.perplexity.ai" \
-d "search_query=test query from AJAX"Expected Response:
{
"success": true,
"data": {
"message": "Citation tracked successfully",
"platform": "Perplexity",
"url": "/test-citation-ajax",
"method": "ajax_fallback"
}
}1. Go to: Bot Analytics → AI Citations
2. You should see 2 new entries:
Date/Time | Platform | Page | Query
----------|-------------|-----------------------|-------------------------
Just now | ChatGPT | /test-citation-rest | test query from REST API
Just now | Perplexity | /test-citation-ajax | test query from AJAX
3. If you see these entries: ✅ Citation tracking works!
# Test 1: ClaudeBot
curl -A "ClaudeBot/1.0" https://www.monocubed.com/sample-page.md
# Test 2: GPTBot
curl -A "GPTBot/1.0" https://www.monocubed.com/sample-page.md
# Test 3: PerplexityBot
curl -A "PerplexityBot/1.0" https://www.monocubed.com/sample-page.md
# Test 4: Regular browser (should NOT be tracked)
curl -A "Mozilla/5.0" https://www.monocubed.com/sample-page1. Go to: Bot Analytics → Overview
2. You should see 3 bot visits:
Bot Name | Page | User Agent | Time
----------------|-------------------|-----------------|----------
ClaudeBot | /sample-page.md | ClaudeBot/1.0 | Just now
GPTBot | /sample-page.md | GPTBot/1.0 | Just now
PerplexityBot | /sample-page.md | PerplexityBot/1.0| Just now
3. The Mozilla visit should NOT appear (it's a regular browser)
1. Go to: Settings → Third Audience → General
2. Find: "Clear Cache" button
3. Click it
4. Expected: "Cleared X cached items" success message
5. If error: Check browser console for details
If button doesn't work:
- Check browser console (F12) → Network tab
- Click button again
- Look for POST request to admin-post.php
- Check response for error message
1. Go to: Settings → Third Audience → Logs
2. Find: "Clear Errors" button
3. Click it
4. Expected: "Error logs cleared" success message
Both buttons should work on monocubed.com now!
# Test if .md URLs work
curl -I https://www.monocubed.com/sample-page.mdExpected Response:
HTTP/1.1 200 OK
Content-Type: text/markdown
...
If you get 404:
- Rewrite rules not flushed
- Go to: Settings → Permalinks → Save Changes
- Try again
# Get markdown content
curl https://www.monocubed.com/sample-page.mdExpected Response:
---
title: Sample Page
date: 2026-02-02
author: Your Name
---
# Sample Page
This is the markdown version of your page...# From plugin directory:
cp wp-content/plugins/third-audience/assets/js/ta-auto-endpoint-detector.js \
your-frontend/lib/third-audience.jsCreate test-tracking.html in your frontend:
<!DOCTYPE html>
<html>
<head>
<title>Test Third Audience Tracking</title>
<script src="ta-auto-endpoint-detector.js"></script>
</head>
<body>
<h1>Test Third Audience Citation Tracking</h1>
<button onclick="testTracking()">Track Test Citation</button>
<pre id="result"></pre>
<script>
const tracker = new ThirdAudienceTracker(
'https://www.monocubed.com',
'YOUR_API_KEY_HERE' // Replace with actual API key
);
tracker.enableDebug();
async function testTracking() {
try {
// Test connection first
document.getElementById('result').textContent = 'Testing connection...\n';
const connectionTest = await tracker.testConnection();
document.getElementById('result').textContent +=
'REST API: ' + (connectionTest.rest.available ? 'Available ✓' : 'Blocked ✗') + '\n' +
'AJAX: ' + (connectionTest.ajax.available ? 'Available ✓' : 'Blocked ✗') + '\n\n';
// Track citation
document.getElementById('result').textContent += 'Tracking citation...\n';
const result = await tracker.trackCitation({
url: '/test-from-frontend',
platform: 'ChatGPT',
searchQuery: 'test from JavaScript client'
});
document.getElementById('result').textContent +=
'Success! ✓\n' + JSON.stringify(result, null, 2);
} catch (error) {
document.getElementById('result').textContent +=
'Error: ' + error.message;
}
}
</script>
</body>
</html>1. Open test-tracking.html in browser
2. Click "Track Test Citation"
3. Check console for debug logs
4. Should see:
- Connection test results
- Citation tracked successfully
5. Go to WordPress Admin → Bot Analytics → AI Citations
6. Should see new entry:
Platform: ChatGPT
Page: /test-from-frontend
Query: test from JavaScript client
Run this in WordPress database:
SELECT option_value
FROM wp_options
WHERE option_name = 'ta_environment_detection';You should see JSON with:
{
"rest_api": {
"accessible": true/false,
"blocker": "none" or "wordfence" etc
},
"security_plugins": "none" or "wordfence" etc,
"server_type": "nginx" or "apache",
"db_permissions": {
"create": true,
"alter": true,
"insert": true
},
"php_version": "8.1" etc,
"detection_time": "2026-02-02 ..."
}SELECT option_value
FROM wp_options
WHERE option_name = 'ta_use_ajax_fallback';Result:
0or empty = Using REST API ✓1= Using AJAX fallback ✓
Both are fine! The plugin works either way.
# Measure REST API response time
time curl https://www.monocubed.com/wp-json/third-audience/v1/health
# Measure AJAX response time
time curl -X POST https://www.monocubed.com/wp-admin/admin-ajax.php \
-d "action=ta_health_check"
# Both should respond in < 1 second# Try 35 requests in 1 minute (should get rate limited after 30)
for i in {1..35}; do
curl -X POST https://www.monocubed.com/wp-admin/admin-ajax.php \
-d "action=ta_track_citation" \
-d "api_key=YOUR_API_KEY" \
-d "url=/test-rate-limit-$i" \
-d "platform=ChatGPT"
echo "Request $i"
sleep 1
done
# Requests 1-30: Should succeed (200 OK)
# Requests 31-35: Should fail (429 Too Many Requests)Chrome:
1. Open: https://www.monocubed.com/test-tracking.html
2. Click track button
3. Check console (F12)
4. Verify citation appears in WordPress admin
Firefox:
(Same steps as Chrome)
Safari:
(Same steps as Chrome)
Mobile (Chrome/Safari):
(Same steps as Chrome)
All browsers should work identically!
# Test with wrong API key (should fail)
curl -X POST https://www.monocubed.com/wp-json/third-audience/v1/track-citation \
-H "Content-Type: application/json" \
-H "X-TA-Api-Key: WRONG_KEY" \
-d '{"url":"/test","platform":"ChatGPT"}'
# Expected: 401 Unauthorized# Test without API key (should fail)
curl -X POST https://www.monocubed.com/wp-json/third-audience/v1/track-citation \
-H "Content-Type: application/json" \
-d '{"url":"/test","platform":"ChatGPT"}'
# Expected: 401 Unauthorized# Test with invalid platform (should fail)
curl -X POST https://www.monocubed.com/wp-json/third-audience/v1/track-citation \
-H "Content-Type: application/json" \
-H "X-TA-Api-Key: YOUR_API_KEY" \
-d '{"url":"/test","platform":"HackerBot"}'
# Expected: 400 Bad Request - Invalid platformAll security tests should properly reject invalid requests!
After completing all tests, verify:
- wp_ta_bot_analytics table exists
- content_type column exists
- is_citation column exists
- Test entries visible in table
- Health endpoint responds (200 or 403/404 is fine)
- Citation tracking works OR fallback works
- Health check responds successfully
- Citation tracking works
- Activation notice appeared
- System Health shows environment
- Bot Analytics shows test entries
- AI Citations shows test entries
- Clear Cache button works
- Clear Errors button works
- JavaScript client detects endpoint
- testConnection() works
- trackCitation() works
- Citations appear in WordPress admin
- ClaudeBot visit tracked
- GPTBot visit tracked
- PerplexityBot visit tracked
- Regular browsers NOT tracked
- Wrong API key rejected
- Missing API key rejected
- Invalid platform rejected
- Rate limiting works (30 req/min)
| Test | Expected Result |
|---|---|
| Plugin Activation | ✓ Activation notice shown |
| Database Tables | ✓ All tables created automatically |
| REST API | ✓ Works OR |
| AJAX Endpoints | ✓ Always works |
| Citation Tracking (REST) | ✓ Works OR falls back to AJAX |
| Citation Tracking (AJAX) | ✓ Always works |
| Bot Analytics | ✓ Tracks AI bot visits |
| AI Citations | ✓ Shows in admin |
| Clear Cache | ✓ Button works |
| Clear Errors | ✓ Button works |
| Markdown URLs | ✓ .md URLs work |
| Frontend Tracking | ✓ JavaScript client works |
| Security | ✓ Validates API keys |
| Rate Limiting | ✓ Limits to 30 req/min |
✓ This is NORMAL on many servers
✓ Plugin automatically uses AJAX fallback
✓ Everything works the same
✓ No action needed
1. Go to: Settings → Third Audience → System Health
2. Click: "Fix Database Now" button
3. Refresh page
4. Check phpMyAdmin again
1. Check API key is correct
2. Test with curl commands above
3. Check WordPress debug.log for errors
4. Verify database has is_citation column
1. Open browser console (F12)
2. Click button
3. Check Network tab for errors
4. Look for nonce or permission errors
Create a test report:
THIRD AUDIENCE TESTING REPORT
Site: www.monocubed.com
Date: [DATE]
Version: 3.4.0
Environment:
- REST API: [Accessible/Fallback]
- Server: [nginx/apache]
- PHP: [version]
- Security Plugin: [name or none]
Test Results:
✓ Plugin activated successfully
✓ Database tables created
✓ Citation tracking works
✓ Bot analytics works
✓ Admin buttons work
✓ Frontend integration works
Issues Found:
[List any issues]
Notes:
[Any additional notes]
If any test fails:
- Check the error message
- Look in WordPress debug.log
- Check browser console
- Review System Health page
- Check database for missing columns
Most common issue: REST API blocked → Plugin uses AJAX fallback → Everything works! ✓