Debugging
Tools and techniques for debugging your Convultra implementation.
Enable Debug Mode
JavaScript Console
Enable verbose logging:
Convultra.debug(true)This logs:
- All events sent
- Server responses
- Click ID captures
- Session information
- Errors
Debug Output Example
[Convultra] Initialized with project: proj_abc123
[Convultra] Session: sess_1704067200000_xyz789
[Convultra] Click ID captured: gclid=Cj0KCQjw...
[Convultra] Page view sent: /products
[Convultra] โ Response: 200 OK {event_id: "evt_..."}
[Convultra] Event sent: add_to_cart {sku: "PROD-001"}
[Convultra] โ Response: 200 OK {event_id: "evt_..."}Disable Debug Mode
Convultra.debug(false)Browser DevTools
Network Tab
Monitor tracking requests:
Open DevTools
F12 or Cmd+Option+I (Mac)
Go to Network Tab
Filter by your endpoint domain or "track"
Watch Requests
Each event creates a POST request:
- Status: Should be 200
- Response: Should contain
event_id
Check Headers
Verify:
- Content-Type: application/json
- Authorization (if using)
Console Tab
Look for:
- JavaScript errors
- Convultra debug logs (if enabled)
- Warnings about blocked requests
Application Tab
Check stored data:
- LocalStorage:
_cu_gclid,_cu_fbclid,_cu_session - Cookies: Session cookies if configured
SDK Utilities
Get Session Info
// Current session ID
Convultra.getSessionId()
// => "sess_1704067200000_abc123"
// User ID (if identified)
Convultra.getUserId()
// => "user_12345" or nullGet Click IDs
Convultra.getClickIds()
// => {
// gclid: "Cj0KCQ...",
// fbclid: "IwAR3x...",
// msclkid: null,
// ttclid: null
// }Get Configuration
Convultra.getConfig()
// => {
// apiKey: "your-api-key",
// endpoint: "https://...",
// autoTrack: true,
// debug: false
// }Test Center
The dashboard Test Center provides live debugging:
Live Event Viewer
Dashboard โ Test โ Live Events
Watch events arrive in real-time:
- Open Test Center
- Interact with your site
- See events appear instantly
Filter Your Session
To isolate your events:
// Get your session ID
const sessionId = Convultra.getSessionId()
console.log('Session:', sessionId)Paste in the Test Center filter.
Implementation Checker
Dashboard โ Test โ Check Implementation
Automatically verifies:
- โ SDK loaded
- โ Initialized correctly
- โ Endpoint responding
- โ Events firing
Common Debug Scenarios
"Events Not Appearing"
Check Network Request
Is the request being made?
- Yes โ Check response for errors
- No โ Check SDK initialization
Check Response
// Success
{ "success": true, "event_id": "evt_..." }
// Error
{ "success": false, "error": "Invalid API key" }Check Project Selection
Verify you're viewing the correct project in dashboard.
"Click IDs Not Captured"
Check URL
Does the landing page URL have the click ID?
https://yoursite.com/?gclid=Cj0KCQ... โ
https://yoursite.com/ โCheck LocalStorage
localStorage.getItem('_cu_gclid')
// Should return the gclid valueCheck SDK Load Order
SDK must load before redirects or URL changes.
"Cross-Domain Not Working"
Check Link Decoration
// Before click
document.querySelector('a[href*="other-domain"]').href
// Should include ?_cvl=eyJz...Check _cvl Parameter
On the target domain, check URL:
https://other-domain.com/page?_cvl=eyJzZXNzaW9u... โ
https://other-domain.com/page โCheck Session Continuity
On target domain:
Convultra.getSessionId()
// Should match source domain sessionLogging to Server
For production debugging, log to your server:
// Custom error handler
window.addEventListener('error', (event) => {
if (event.message.includes('Convultra')) {
fetch('/api/log-error', {
method: 'POST',
body: JSON.stringify({
error: event.message,
source: 'convultra',
url: window.location.href
})
})
}
})Platform-Specific Debugging
Google Ads
- Go to Conversions โ Summary
- Click your conversion action
- Check Diagnostics tab
Meta Ads
- Go to Events Manager
- Select your Pixel
- Click Test Events
- Send test conversion from Convultra
Microsoft Ads
- Go to Conversions
- View Import log
- Check for recent imports and errors
Debugging Checklist
Pre-Launch
- SDK loading on all pages
- Debug mode shows expected logs
- Network requests successful
- Click IDs being captured
- Conversions appearing in dashboard
- Platform integrations forwarding
Production Issues
- Check for JavaScript errors
- Verify API key matches project
- Check endpoint URL
- Review integration logs
- Test with clean browser profile
Getting Help
If issues persist:
- Export debug logs - Copy console output with debug enabled
- Note browser/version - Chrome 120, Safari 17, etc.
- Describe expected vs actual - What should happen vs what happens
- Check status page - Any known issues