Docs
Everything you need to install ABForge and start tracking.
1. Install the snippet
Paste this one line on every page of your site, just before the closing </head> tag:
<script async src="https://abforge.3dshawn.com/t.js?k=YOUR_KEY"></script>
Find your YOUR_KEY on the Sites page after signing up.
2. Fire custom events
The tracker exposes a tiny global API on window.abforge:
// Track an arbitrary event with optional numeric value:
window.abforge.event('signup_started');
window.abforge.event('plan_selected', 49, { plan: 'pro' });
// Mark a goal explicitly (matched by name against your goals):
window.abforge.goal('checkout_complete', 99.50);
// Inspect which experiments the visitor is currently in:
window.abforge.isExposed();
3. Goals
Configure goals on the Goals page. Each goal is one of:
- Page view — visitor lands on a URL matching your pattern
- URL destination — same as page-view but framed as a funnel terminus
- Click selector — visitor clicks an element matching your CSS selector
- Custom event —
window.abforge.event('name') with a matching name
- Form submit — a form on a matched URL is submitted
- Revenue — any custom event with a numeric value attached
4. A/B + MVT changes format
Each variant carries a changes JSON describing how to mutate the page:
{
"ops": [
{ "selector": ".hero h1", "op": "text", "value": "Stop guessing. Start forging." },
{ "selector": "a.cta-primary", "op": "attr", "attr": "href", "value": "/signup?utm=v2" },
{ "selector": ".old-banner", "op": "hide" },
{ "selector": ".price-tag", "op": "css", "value": "color: #ff7a3d; font-weight: 800;" }
],
"custom_css": "body { background: #111; }",
"custom_js": "console.log('variant B loaded');",
"redirect_url": null
}
The tracker applies these client-side as soon as the variant is assigned.
5. Privacy
ABForge does not require visitor consent in most jurisdictions because we do not store PII by default and use first-party cookies under your own domain context. If you want to be extra safe (EEA/UK), wrap the snippet in your consent gate.