Lovable
Lovable apps are React single-page apps. Add the script to index.html once; Pixelary tracks page views as visitors move between routes.
1 Add the script to index.html
Ask Lovable to make the change. Paste your own site key from the dashboard into this prompt:
Add Pixelary conversion tracking. In index.html, inside <head>, add exactly this, unchanged:
<script>
window.pixelary = window.pixelary || function () {
(window.pixelary.q = window.pixelary.q || []).push(arguments);
};
</script>
<script async src="https://cdn.pixelary.app/s/px_7hq2lm4x.js"></script>
Don't add any other tracking code. If you edit the code yourself, put the same lines into the <head> of index.html:
<script>
window.pixelary = window.pixelary || function () {
(window.pixelary.q = window.pixelary.q || []).push(arguments);
};
</script>
<script async src="https://cdn.pixelary.app/s/px_7hq2lm4x.js"></script> 2 Publish and add your domain
Publish the app and add every domain it runs on to the site in the dashboard, including a custom domain. Events from other domains are ignored.
3 Send conversions from code
Sign-ups, checkouts and other app actions happen in your code, so send them with the JavaScript API:
// After a successful sign-up, for example
window.pixelary("track", "CompleteRegistration", {}, {
user: { email: form.email },
}); For TypeScript, declare the global once:
// src/pixelary.d.ts
declare global {
interface Window {
pixelary: (command: string, ...args: unknown[]) => void;
}
}
export {}; Consent banner
Pixelary sends nothing a visitor has declined. In the EEA, the UK and Switzerland it waits for the visitor’s yes before any pixel loads or any event leaves the page.
Pixelary reads these on its own, with no extra setup:
- Google Consent Mode v2
- IAB TCF 2.2
- Global Privacy Control
- Cookiebot
- OneTrust
- CookieYes
- Usercentrics
- Complianz
- iubenda
- Termly
- Osano
- CookieFirst
- Didomi (via TCF)
- Framer cookie banner
Another banner can pass its answer with one line of code. Consent & banners
Something here doesn’t match what you see? Write to hello@pixelary.app.