Installation
Install SourceTag on Kentico
Add SourceTag’s tracking script to your Kentico site by editing your master page template or using the built-in script management features.
Step 1: Copy your script tag
In your SourceTag dashboard, go to your site’s detail page and copy the script tag. It looks like:
<script src="https://cdn.sourcetag.io/scripts/YOUR_SITE_ID/st.js" async></script> Step 2: Add to Kentico
Option A: Master page template
- In the Kentico admin, navigate to your site’s master page or layout template
- Open the template for editing
- Paste the script tag just before the closing
</head>tag - Save the template
This ensures the script loads on every page that uses the master template.
Option B: Header script injection
Depending on your Kentico version, you may have a dedicated area for adding scripts to the page header:
- Go to your site’s settings in the Kentico admin
- Look for the custom header scripts or HTML head section
- Paste the script tag
- Save
Check your Kentico version’s documentation for the exact location, as this varies between Kentico CMS, Kentico Xperience, and Kentico Xperience by Kentico.
Step 3: Test
Visit your site with UTM parameters:
https://yoursite.com/?utm_source=test&utm_medium=cpc&utm_campaign=kentico-test Submit a form on your site and check wherever your form submissions are received. The submission should include hidden fields with attribution data.
Notes
- The script works with standard HTML forms rendered by Kentico, including forms built with Kentico’s form builder. Hidden fields are added automatically.
- If your forms use non-standard markup or are rendered via AJAX, SourceTag’s MutationObserver will detect them when they appear in the DOM.
- For longer cookie persistence, consider setting up SourceTag’s server-side cookie endpoint if your Kentico hosting environment supports it. Otherwise, browser cookies are limited to 7 days.