Unbounce
Add Rybbit analytics to your Unbounce landing pages
Unbounce's Script Manager applies a script to every page on a domain, including pages you publish later, so that is where the snippet goes. If you only want to track a single Classic Builder page, the page-level Javascripts dialog works too.
Custom scripts and pixels are not available on the Starter plan; you need Build or higher. Script Manager also requires a connected custom domain: it does not apply to pages on the unbouncepages.com test domain.
Get your tracking snippet
In your Rybbit dashboard, open Site Settings → Tracking Script and copy your snippet. It looks like this:
<script src="https://app.rybbit.io/api/script.js?siteId=YOUR_SITE_ID" defer></script>YOUR_SITE_ID is the numeric ID of your site. If you self-host Rybbit, app.rybbit.io is the domain of your own instance.
Add the snippet to Unbounce
- In the left menu, click Settings, then Script Manager.
- Click Add a Script, choose Custom Script, give it a name and click Add Script Details.
- Set Placement to Head and Included on to All (main pages and confirmation dialogs).
- Paste the snippet into the editor.
- Tick the domain(s) the script should apply to on the right, then click Save Changes.
The script is added to every page on those domains and to new pages published there later. If a page does not pick it up, republish that page.
- Open the page in the Classic Builder and click Javascripts in the bottom-left corner.
- Give the script a name and set Placement to Head.
- Paste the snippet and click Done.
- Save, then Publish (or Republish) the page. Custom scripts do not run in the builder or in Preview, only on the published page.
Smart Builder pages have no page-level script dialog; use Script Manager for those.
Verify installation
Open your live site in a new tab and click through a few pages. Within a few seconds the pageviews appear in the Rybbit dashboard.
If nothing shows up:
- View the page source and search for
script.js?siteId=to confirm the snippet is on the page. - Open the browser Network tab and check that
script.jsreturns200and thatPOSTrequests go to/api/track. - Disable ad blockers, or set up a proxy so the script loads from your own domain.
- See the script troubleshooting guide for other common causes.
Track custom events
Form submission
Unbounce exposes window.ub.hooks, an unofficial hook that runs after a lead is recorded. Add this as a second Script Manager script (or page script) with placement Before Body End Tag to send a lead event with the page name and variant:
<script>
window.ub.hooks.afterFormSubmit.push(function () {
if (window.rybbit) {
window.rybbit.event("lead", {
page: window.ub.page.name,
variant: window.ub.page.variantId
});
}
});
</script>window.ub.page.name, window.ub.page.variantId and window.ub.page.id are available on every Unbounce page, so you can compare A/B variants in Rybbit without any other setup.
Troubleshooting
- Script runs twice: a script that is both in Script Manager and on an individual page loads twice. Remove the page-level copy and keep the Script Manager one.
- Nothing on
unbouncepages.com: Script Manager only applies to custom domains. Add the snippet at page level to test on the Unbounce test domain. - Script Manager missing: the account is on the Starter plan, which does not include custom scripts.
Next steps
- Track custom events such as signups, purchases and button clicks.
- Identify users to connect sessions to accounts.
- Proxy the script through your own domain to bypass ad blockers.
- Script attributes let you skip or mask URLs and tag events.