← All docs

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.

  1. Set up SourceTag hidden fields on your form (see your form builder setup guide)
  2. Connect the form to Klaviyo via Zapier or Make
  3. In the Zap/scenario, map each SourceTag field to a Klaviyo profile property

Core fields (map these)

SourceTag fieldKlaviyo property nameDescription
st_fc_channelst_fc_channelFirst click channel
st_fc_detail_1st_fc_detail_1First click smart field 1
st_fc_detail_2st_fc_detail_2First click smart field 2
st_fc_detail_3st_fc_detail_3First click smart field 3
st_fc_detail_4st_fc_detail_4First click smart field 4
st_lc_channelst_lc_channelLast click channel
st_lc_detail_1st_lc_detail_1Last click smart field 1
st_lc_detail_2st_lc_detail_2Last click smart field 2
st_lc_detail_3st_lc_detail_3Last click smart field 3
st_lc_detail_4st_lc_detail_4Last click smart field 4
st_fc_landing_pagest_fc_landing_pageFirst click landing page
st_lc_landing_pagest_lc_landing_pageLast click landing page

Optional extended fields

If you’ve enabled extended field groups in your SourceTag dashboard, also map:

SourceTag fieldKlaviyo property nameDescription
st_fc_click_idst_fc_click_idFirst click ID (gclid, fbclid, etc.)
st_lc_click_idst_lc_click_idLast click ID
st_visitsst_visitsVisit count
st_days_to_convertst_days_to_convertDays to conversion
st_devicest_deviceDevice 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

  1. Visit your site with UTM parameters: ?utm_source=test&utm_medium=cpc&utm_campaign=klaviyo-test
  2. Submit a form
  3. 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_channel to see which channels drive signups

Doesn't answer your question or need more help? Get in touch.