CRM Setup
Set up SourceTag with Klaviyo
Klaviyo captures UTM parameters from URLs automatically. But SourceTag adds more: channel categorisation, smart fields, click IDs, visit counts, and first click / last click attribution. Here’s how to get that data into Klaviyo.
What you need
- SourceTag installed on your site
- A Klaviyo account
Option 1: Use a third-party form (recommended)
If your site uses a form builder like Gravity Forms, WPForms, HubSpot Forms, or Typeform, you can connect it to Klaviyo via Zapier or Make. SourceTag populates hidden fields in these forms, and the data flows through to Klaviyo as custom properties.
- Set up SourceTag hidden fields on your form (see your form builder setup guide)
- Connect the form to Klaviyo via Zapier or Make
- In the Zap/scenario, map each SourceTag field to a Klaviyo profile property
Core fields (map these)
| SourceTag field | Klaviyo property name | Description |
|---|---|---|
st_fc_channel | st_fc_channel | First click channel |
st_fc_detail_1 | st_fc_detail_1 | First click smart field 1 |
st_fc_detail_2 | st_fc_detail_2 | First click smart field 2 |
st_fc_detail_3 | st_fc_detail_3 | First click smart field 3 |
st_fc_detail_4 | st_fc_detail_4 | First click smart field 4 |
st_lc_channel | st_lc_channel | Last click channel |
st_lc_detail_1 | st_lc_detail_1 | Last click smart field 1 |
st_lc_detail_2 | st_lc_detail_2 | Last click smart field 2 |
st_lc_detail_3 | st_lc_detail_3 | Last click smart field 3 |
st_lc_detail_4 | st_lc_detail_4 | Last click smart field 4 |
st_fc_landing_page | st_fc_landing_page | First click landing page |
st_lc_landing_page | st_lc_landing_page | Last click landing page |
Optional extended fields
If you’ve enabled extended field groups in your SourceTag dashboard, also map:
| SourceTag field | Klaviyo property name | Description |
|---|---|---|
st_fc_click_id | st_fc_click_id | First click ID (gclid, fbclid, etc.) |
st_lc_click_id | st_lc_click_id | Last click ID |
st_visits | st_visits | Visit count |
st_days_to_convert | st_days_to_convert | Days to conversion |
st_device | st_device | Device type |
See Captured Fields for the full list of available fields.
Option 2: Use the SourceTag JavaScript API
If you use Klaviyo’s own signup forms (popups, embedded forms), SourceTag can’t populate hidden fields in them directly because Klaviyo forms don’t support dynamic hidden field values.
Instead, use SourceTag’s JavaScript API to read the attribution data and pass it to Klaviyo via their JavaScript API:
// After Klaviyo form submission
var st = window.__sourcetag;
if (st) {
var fc = st.getFC();
var lc = st.getLC();
var meta = st.getMeta();
if (fc && window._learnq) {
window._learnq.push(['identify', {
'st_fc_channel': fc.channel,
'st_fc_detail_1': fc.d1,
'st_fc_detail_2': fc.d2,
'st_fc_detail_3': fc.d3,
'st_fc_detail_4': fc.d4,
'st_fc_landing_page': fc.lp,
'st_lc_channel': lc ? lc.channel : fc.channel,
'st_lc_detail_1': lc ? lc.d1 : fc.d1,
'st_lc_detail_2': lc ? lc.d2 : fc.d2,
'st_lc_detail_3': lc ? lc.d3 : fc.d3,
'st_lc_detail_4': lc ? lc.d4 : fc.d4,
'st_lc_landing_page': lc ? lc.lp : fc.lp,
'st_visits': meta ? meta.visits : null,
'st_days_to_convert': meta ? meta.dtc : null,
'st_device': meta ? meta.device : null
}]);
}
} This updates the Klaviyo profile with attribution data after the form is submitted.
Option 3: Klaviyo’s built-in UTM tracking
Klaviyo automatically captures UTM parameters from the URL when someone submits a Klaviyo form. This gives you utm_source, utm_medium, and utm_campaign on the profile. However, it does not give you channel categorisation, smart fields, click IDs, or first click / last click attribution. If basic UTM tracking is enough, you may not need SourceTag for Klaviyo forms specifically.
Test
- Visit your site with UTM parameters:
?utm_source=test&utm_medium=cpc&utm_campaign=klaviyo-test - Submit a form
- In Klaviyo, find the profile and check the custom properties
Tips
- Option 1 (third-party form via Zapier) is the most reliable approach
- Klaviyo property names are case-sensitive
- You can segment subscribers by
st_fc_channelto see which channels drive signups
Doesn't answer your question or need more help? Get in touch.
