Skip to main content

How do I set up conversion tracking?

Updated today

After enabling conversion tracking and adding a code snippet to your website, you'll be able to view reports that connect your clicks to your conversions.

Before you begin

  • You'll need to be the owner or an admin on your Rebrandly account

  • You need the ability and permissions to edit the HTML of your website, or work with someone who can (either directly or through your CMS or tag manager)

  • Conversion Tracking must be available on your subscription plan, check out our pricing page for plan availability

To set up conversion tracking:

Your tracking script uses a unique API key to authenticate with your Rebrandly workspace. This isn't the same as the general API keys in your settings.

  1. Click your profile, then Settings.

  2. Click Conversion Tracking.

  3. Select the Setup tab.

  4. Click Create API key.

  5. Give your key a name (for example, the name of the website you're tracking), then click Create.

Your new conversion tracking API key appears in the list. Keep this page open to use it in the next step.

Tip: Create one API key per website. This keeps your data clean and makes it easier to manage access later.

Note: Your conversion API key is intentionally designed to be public — it will be visible in your website's source code as part of the tracking script. This is expected and safe. It's separate from your main Rebrandly API keys, which should always be kept private.

Step 2: Copy your tracking script

  1. On the Setup tab, select the API key you just created.

  2. The tracking script snippet updates to include your API key automatically.

  3. Click Copy to copy the full script to your clipboard.

The script looks like this (with your API key already embedded):

<script src="https://cdb.rebrandly.com/dist/rbly.js" data-api-key="YOUR_API_KEY"></script>

Step 3: Add the script to your website

Paste the script into the <head> section of every page on your website — including your homepage and any pages where conversions happen (checkout, thank-you pages, sign-up confirmations).

If you use a CMS or tag manager:

  • WordPress — Use a plugin like Insert Headers and Footers, or add it directly in Appearance > Theme Editor > header.php

  • Shopify — Add it in Online Store > Themes > Edit code > theme.liquid, inside <head>

  • Google Tag Manager — Create a new Custom HTML tag, paste the script, and set it to fire on All Pages

  • Webflow — Add it under Site Settings > Custom Code > Head Code

Make sure the script is in the <head> of every page, not just your homepage. If it's only on some pages, conversions that happen on untracked pages will be missed.

Once the script is on your site, it automatically tracks page views. To set up and track your conversion events, see How do I set up conversion tracking events?

Step 4: Test and verify the installation

After adding the script, verify that it's working before you start relying on the data.

  1. Return to Settings > Conversion Tracking > Setup tab.

  2. Click Test installation.

  3. Rebrandly opens a test page and checks whether the script is firing.

  4. Wait up to 30 seconds while the verification runs.

If verification succeeds: Your domain appears in the Tracked Domains tab with a verified status. You're all set.

If verification fails: See troubleshooting tips below.

Troubleshooting

The script isn't being detected

  • Make sure the script is in <head>, not <body> or <footer>

  • Check that the page you're testing is the same domain where you installed the script

  • If you used a tag manager, confirm the tag is published and firing on the test page

  • Clear your browser cache and try verifying again

The API key looks wrong in the snippet

  • Return to the Setup tab, re-select your API key, and re-copy the snippet

  • Make sure you didn't accidentally trim any characters when pasting

Verification timed out

  • The test runs for up to 30 seconds. If it times out, the script may not have loaded in time. Check that no script-blocking browser extensions are interfering, then try again.

Did this answer your question?