Form Setup
Set up SourceTag with Contact Form 7
Contact Form 7 uses shortcodes to define form fields. You need to add hidden field shortcodes for the SourceTag data.
What you need
- SourceTag installed on your site (script tag or WordPress plugin)
- A Contact Form 7 form
Step 1: Open your form
Go to Contact > Contact Forms and edit the form you want to track.
[IMAGE: Screenshot of CF7 form editor]
Step 2: Add hidden field shortcodes
In the form editor, add the following shortcodes. You can place them anywhere in the form (they’re invisible to visitors).
Core fields (add these)
[hidden st_fc_channel]
[hidden st_fc_detail_1]
[hidden st_fc_detail_2]
[hidden st_fc_detail_3]
[hidden st_fc_detail_4]
[hidden st_lc_channel]
[hidden st_lc_detail_1]
[hidden st_lc_detail_2]
[hidden st_lc_detail_3]
[hidden st_lc_detail_4]
[hidden st_fc_landing_page]
[hidden st_lc_landing_page] Optional extended fields
[hidden st_fc_click_id]
[hidden st_lc_click_id]
[hidden st_visits]
[hidden st_days_to_convert]
[hidden st_device] [IMAGE: Screenshot of CF7 form editor with hidden shortcodes added]
Step 3: Update the email template
Go to the Mail tab. Add the field tags to your email template so the attribution data appears in notifications:
First contact channel: [st_fc_channel]
First contact detail: [st_fc_detail_1] / [st_fc_detail_2]
Last contact channel: [st_lc_channel]
Landing page: [st_fc_landing_page] [IMAGE: Screenshot of CF7 mail template with field tags]
Step 4: Save and test
Save the form. Visit a page with this form using UTM parameters:
?utm_source=test&utm_medium=cpc&utm_campaign=test-campaign Submit the form. Check the notification email for the attribution data.
Tips
- CF7 hidden fields use the
[hidden fieldname]shortcode format. - The field name in the shortcode must match exactly. Copy them from your SourceTag dashboard.
- If you use Flamingo (CF7 message storage plugin), the hidden field data appears in stored messages too.