Installation

Install SourceTag on WordPress

The SourceTag WordPress plugin is the easiest way to get started. It automatically injects the tracking script and optionally sets server-side cookies for Safari compatibility.

Step 1: Install the plugin

From the WordPress plugin directory:

  1. Go to Plugins → Add New in your WordPress dashboard
  2. Search for “SourceTag”
  3. Click Install Now, then Activate

Manual upload:

  1. Download the plugin zip from your SourceTag dashboard
  2. Go to Plugins → Add New → Upload Plugin
  3. Upload the zip file and activate

Step 2: Enter your Site ID

  1. Go to Settings → SourceTag
  2. Paste your Site ID (found on your site’s detail page in the SourceTag dashboard)
  3. Click Save Changes

The plugin now injects the tracking script into every page on your site.

Step 3: Enable server-side cookies (optional, Pro)

Safari, Brave, and other privacy-focused browsers limit JavaScript cookies to 7 days. If your sales cycle is longer than a week, enable server-side cookies:

  1. In Settings → SourceTag, tick Enable server-side cookie setting
  2. Save Changes

This makes the plugin re-set the attribution cookie via PHP setcookie() on every page load. Safari treats HTTP-header-set cookies as server cookies, allowing up to 400 days of persistence.

Note: This feature requires a Pro plan or higher.

Step 4: Test

  1. Visit your site with UTM parameters: ?utm_source=test&utm_medium=cpc
  2. Submit any form on your site
  3. Check the form notification email. You should see hidden fields like st_fc_channel, st_lc_source, etc.

Compatible form builders

The plugin works with any WordPress form builder:

  • Contact Form 7
  • Gravity Forms
  • WPForms
  • Elementor Forms
  • Formidable Forms
  • Ninja Forms
  • Any form that renders standard HTML <form> elements

No changes to your forms are needed. SourceTag detects forms on the page and adds hidden fields automatically.

Troubleshooting

Hidden fields not appearing: Make sure the Site ID is correct and the script has been generated in your SourceTag dashboard. View the page source to check the script tag is present.

Server-side cookies not working: The cookie refresh happens on PHP’s init hook, before any output. If you’re using full-page caching (WP Rocket, W3 Total Cache), the PHP hook may not run on cached pages. Exclude pages with forms from the cache, or configure the cache to pass cookies through.