Configuration

Custom Parameters

SourceTag captures UTM parameters and click IDs by default. But you might have other URL parameters you want to track. Custom parameters let you capture any arbitrary URL parameter and pass it into your forms.

How it works

  1. You tell SourceTag which URL parameters to watch for
  2. When a visitor lands on a page with that parameter in the URL, the value is captured
  3. When the visitor submits a form, the value is populated into a hidden field named st_custom_[name]

For example, if you configure brand as a custom parameter and a visitor arrives via:

https://yoursite.com/?utm_source=google&utm_medium=cpc&brand=acme

SourceTag will populate a hidden field called st_custom_brand with the value acme when that visitor submits a form.

Setting up custom parameters

  1. In the SourceTag dashboard, go to your site’s Fields page
  2. Switch to Advanced Mode (if you’re not already there)
  3. Scroll down to the Custom Parameters section
  4. Add the URL parameter names you want to capture

[IMAGE: Screenshot of the SourceTag Fields page in Advanced Mode showing the Custom Parameters section with example parameters added]

  1. Click Generate Script to rebuild and redeploy your tracking script

The script needs to be regenerated because custom parameters are baked into the script configuration. They won’t take effect until you generate.

Common use cases

Brand or product tracking

If you run campaigns for multiple brands or products under one domain, add brand or product as a custom parameter. Tag your ad URLs accordingly:

?utm_source=google&utm_medium=cpc&utm_campaign=summer-sale&brand=acme

This lets you attribute leads to specific brands within your CRM.

Affiliate or partner IDs

Track which affiliate or partner referred a lead:

?utm_source=partner-network&utm_medium=affiliate&affiliate_id=12345

Configure affiliate_id as a custom parameter. The hidden field st_custom_affiliate_id will contain 12345.

Ad creative tracking

Go beyond utm_content with specific creative identifiers:

?utm_source=facebook&utm_medium=cpc&creative=video-testimonial-v2

Configure creative as a custom parameter to capture the creative variant.

Campaign-specific parameters

Any parameter your marketing team uses in URLs can be captured. Some examples:

ParameterExample valueField name
brandacmest_custom_brand
affiliate_id12345st_custom_affiliate_id
creativevideo-testimonial-v2st_custom_creative
audienceretargeting-30dst_custom_audience
regionnzst_custom_region
offerfree-trialst_custom_offer

How custom parameters are stored

Custom parameter values are captured when the visitor lands on a page with that parameter in the URL. They’re stored in memory for the current page session and populated into any form the visitor submits on that page.

Unlike UTM parameters, custom parameters are not stored in the cookie and do not persist across page views. They’re captured fresh on each page where the parameter is present in the URL. If you need them to persist, consider using the JavaScript API to read them from the URL yourself and store them.

CRM field setup

When creating custom fields in your CRM to receive custom parameter data, make sure the internal field name matches the st_custom_[name] format.

For example, if you’ve configured brand as a custom parameter:

  • In HubSpot, create a contact property with internal name st_custom_brand
  • In Salesforce, create a custom lead field with API name st_custom_brand
  • In other CRMs, follow the same pattern

Tips

  • Parameter names are case-sensitive. Brand and brand are treated as different parameters.
  • Only parameters present in the URL are captured. If a visitor arrives without the parameter, no hidden field is created for that visit.
  • You can add as many custom parameters as you need. There’s no hard limit.
  • Make sure your marketing team knows which parameter names to use in their campaign URLs to keep things consistent.