In digital marketing, good tracking is the difference between knowing what’s working and flying blind. And yet, one common issue trips up even savvy marketers: losing UTM parameters when a user clicks through to an external tool like SavvyCal, Calendly, or any third-party platform.

Picture this: someone clicks your Google Ad, lands on your Webflow page with all the right UTM tags, and then schedules a call through SavvyCal. But because the link drops the tracking data, that lead now shows up as “Direct.” No source, no campaign data, no clue how they found you.

Thankfully, fixing this is dead simple. With just a few lines of code, you can automatically carry UTM parameters from your Webflow page to any external link - preserving your attribution and keeping your analytics clean.

Here’s how to set it up in under 5 minutes (with the help of ChatGPT code).

Important Note

You can rename any of the fields to better match your setup — just be sure to update the code wherever those names are used. I’ve kept the terms as generic as possible to make customization easier, and added comments to explain what each part of the code does.

Part

What it does

When to change it

utmKeys

List of parameters you want to capture

Add/remove any query parameters you use (e.g. ref, campaign_id)

a#external-link

Selector for your link

If your link has a different id, update the selector

data-base-url

HTML attribute for the base link

If you name your custom attribute something else

https://savvycal.com/yourname

Actual destination link (set in Webflow)

Change this to your specific external tool’s link

What You’ll Need to Get Started

  1. Your Webflow site (paid version - must allow custom code)

  2. Your external link, e.g. https://savvycal.com/yourname.

What This Will Do

When a visitor comes to your site with UTM parameters (e.g. ?utm_source=google&utm_medium=cpc), this script will:

  • Detect the UTM values.

  • Append them to your external link when it's clicked.

How to Implement in Webflow

  1. Select your external link in your Webflow project (e.g. your call-to-action)

  2. In the Setting panel set the ID to external-link

  3. Still in the settings panel go down to Custom Attributes and add

    • Name: data-base-url

    • Value: https://savvycal.com/yourname (your link)

  4. Now all we have to do is add the following script to either the site, or the individual page - depending on your needs.

    • Globally: Project SettingsCustom CodeFooter

    • Or per page: Page SettingsBefore </body> tag

  1. Publish and test 🎉

Example

If someone lands on:

https://yourwebsite.com?utm_source=google&utm_campaign=demo

Clicking the link will send them to:

https://savvycal.com/yourname?utm_source=google&utm_campaign=demo

With this simple setup, you can ensure your tracking stays intact even when users jump from your Webflow site to external tools like SavvyCal, Calendly, or Typeform. It’s a small tweak that makes a big difference in your attribution clarity and campaign performance. If you're running ads, tracking referrals, or just want better insights into what's working, this approach is a no-brainer.

Keep Reading