Documentation Index
Fetch the complete documentation index at: https://docs.trygravity.ai/llms.txt
Use this file to discover all available pages before exploring further.
Why you need this
Without the pixel, Gravity can measure impressions and clicks — but not what happens after the user lands on your site. Install the pixel on your landing + conversion pages and we can attribute purchases, signups, and demo requests back to the specific ad that drove them. This unlocks:- Per-campaign conversion rate and ROAS in your dashboard
- Conversion reporting tied back to specific campaigns and ads
- Retargeting audience segmentation (upcoming feature)
Install — web
Drop this into every page of your site (or at minimum: landing page, checkout, signup):YOUR_ADVERTISER_ID lives in your dashboard under Settings → Organization. It’s a UUID.
Verify it’s firing
- Load your landing page with the pixel installed.
- Open your browser DevTools → Network tab and look for a request to
api.trygravity.ai/track/gr-events. - A
200response means the pixel is firing correctly. Events typically appear in your dashboard within ~10 minutes.
How conversions are tracked
The pixel captures page views and prepares attribution context. Conversions themselves are posted server-to-server from your backend to Gravity — this is more reliable than client-side tracking and allows you to attach richer data (emails, order details, line items). Four supported paths, pick the one that fits your stack:Conversions API (recommended)
The Gravity Conversions API (CAPI) gives you the most control and the richest data. The pixel captures attribution context on the frontend; your backend sends the conversion with full order details. On your checkout page:Shopify — one-click OAuth
If your store runs on Shopify, connect via OAuth in the dashboard under Settings → Organization. This automatically:- Installs the pixel on every storefront page.
- Subscribes to Shopify’s
checkout_completedevent and posts conversions toPOST /shopify/conversionson your behalf. - Pulls customer emails for attribution (hashed before ingest).
Direct API (legacy)
A simpler endpoint for basic conversion tracking:Cal.com bookings
For consultative / demo-based flows, Gravity can receive Cal.com booking webhooks atPOST /caldotcom/booking. Configure in Cal.com’s webhook settings; we attribute bookings back to the originating ad automatically.
App installs (iOS / Android)
Track mobile app installs as conversions — either from your app backend (S2S) or via MMP postback (AppsFlyer, Adjust, Kochava, Branch, Singular). Full guide: App install tracking.Not currently supported
Segment, GTM, and Stripe webhooks aren’t supported integrations today. Use the Conversions API from your backend if you’re on one of those stacks.Customer email
Sendingcustomer_email on the Direct API request materially improves attribution (survives device switches, incomplete page loads, etc.). Gravity hashes it server-side (SHA-256 over lowercased+trimmed) before it lands in the warehouse — the raw value never persists. Send over TLS only, which is already the case if you’re hitting https://api.trygravity.ai.
If your data-handling policy requires hashing before the value leaves your server, do your own SHA-256 (lowercased + trimmed email) and put the digest under metadata.customer_email_hash for forensic correlation — but note the attribution pipeline only joins on the hash produced by our server from customer_email, so pre-hashing currently reduces match rate.
Respect consent
Don’t fire the pixel or send conversions before the user accepts your cookie/consent banner (where one applies in your jurisdiction). Standard integration patterns — conditional script load behind a consent manager — work as expected.Next
Analytics
Reports, attribution windows, and ROAS.