Public API
Pixel
Drop-in browser script for conversion events. Use postbacks when the event happens on a partner server instead.
Install
Serve the script from brand-api (no /api/v1 prefix). Replace BRAND_ID with your workspace id.
<script
src="https://brand-api.pactreach.com/pixel.js"
data-brand="BRAND_ID"
async
></script>Staging: https://brand-api-dev.pactreach.com/pixel.js
Track events
window.pactreach('track', 'purchase', {
valueMinor: 150000,
currency: 'NGN',
clickId: 'clk_...',
linkCode: 'ab12cd',
eventId: 'order-99102'
});The script POSTs to /pixel/collect with your brand id. Prefer a stable eventId so retries do not create duplicate conversions.
Image beacon
For environments that cannot run JavaScript, fire a 1×1 GIF (example production host):
<img
src="https://brand-api.pactreach.com/pixel.gif?bid=BRAND_ID&e=purchase&cid=clk_...&v=150000&cur=NGN"
width="1"
height="1"
alt=""
/>When to use postbacks instead
Server-side partners should call conversion postbacks with an Idempotency-Key. The pixel is for browser and tag-manager installs.

