Use this file to discover all available pages before exploring further.
The Gravity pixel (gr-pix.js) is a required install on your site. It captures attribution context so Gravity can tie ad impressions and clicks back to real outcomes — without it, we can’t measure performance or pay you.
The pixel is required. Without it, Gravity cannot attribute conversions or calculate payouts. Install it before going live.
If your app opens Gravity ad links inside an in-app WebView rather than the system browser, install the pixel inside the WebView too with the inAppBrowser: true flag. This preserves attribution when a user clicks an ad and lands on the advertiser’s page inside your app.
Skip this section if your app opens ad links in the system browser (UIApplication.shared.open(url) or equivalent). The web install above is all you need.
Make sure the script loads last in the document (before </body>).
Check DevTools Network tab for a request to code.trygravity.ai/gr-pix.js.
Check the console for errors. If another script throws before the pixel runs, the pixel load order may need adjusting.
Pixel fires but events don't show in dashboard
Confirm YOUR_PIXEL_ID matches the Pixel ID in Settings → Platform Settings. It’s separate from your API key.
Check DevTools Network for api.trygravity.ai/track/gr-events POST requests. A 200 response means we got it; dashboard updates within ~10 minutes.
WebView events not arriving
iOS WebKit needs WKWebsiteDataStore.default() (the default). .nonPersistentDataStore() breaks cookie persistence.
Verify injectionTime / onPageFinished actually fires — console.log from inside the injected script and capture via WKScriptMessageHandler (Swift) or onMessage (RN).