2 builders who never spoke to each other
Carry the campaign into the form
Most marketing and form platforms read campaign parameters off the current URL only, and several capture nothing at all, so attribution vanishes the moment a visitor browses one page before converting. Store the values for the whole visit and copy them into hidden fields on submission, which is a few lines rather than the vendor upgrade being quoted. Separate forms per page achieve the same tagging by hand.
The method
- 01
Before paying for a vendor tier upgrade to pass campaign data into your CRM, check whether your analytics script already exposes the source values and write a few lines to copy them into hidden form fields.
- 02
Add a hidden input to each lead form whose name matches the URL parameter you want stored, and have a small script populate it on page load.
- 03
Do not assume your marketing platform already captures campaign parameters: most read only the current page's URL, and several capture nothing at all.
- 04
Persist the parameters for the whole visit rather than reading them off the current URL, otherwise attribution disappears the moment a visitor browses to another page before converting.
- 05
Build separate contact forms per landing page so each lead arrives tagged with what brought them in.
What it returned
Kogan pulled source, medium, campaign and referrer out of the analytics tool's JavaScript object into a webinar registration form, avoiding a form-service upgrade costing several thousand dollars a year.
His script is published as sup.js on GitHub and loadable from a CDN or Google Tag Manager; it can optionally clear the saved values after submission.
HubSpot forms read UTMs from the current URL only and lose them if the visitor navigates first; Marketo's URL option behaves the same; Eloqua does not save them even when present; Wufoo only reads parameters using its own field naming; Salesforce Web-to-Lead and Mailchimp forms cannot capture them.
He stores each parameter in sessionStorage so it survives navigation; the built-in capture in marketing and form tools only works when the visitor submits on the page they landed on.
Sources
- Marketing Automation: Sell While You Sleep - Double Your FreelancingKurt Elster · doubleyourfreelancing.com · Marketing Automation Tools · 2015-08-20
- It Pays to Have a Marketer Who CodesGreg Kogan · gkogan.co · 2015-12-23
- Get URL + UTM Parameters with JavascriptGreg Kogan · gkogan.co · Get URL + UTM Parameters in Forms (Free and Easy) · 2017-07-04
the second source
Three plays a week, for the phase you are in
No roundup of links, no news. Three tactics more than one builder arrived at separately, with the numbers each one returned and the disagreements left in.
More in landing page
- Put a page up before you build anything7 unconnected · contested
- Build a page per audience, not one for all5 unconnected
- Start from a bought template, not a blank file4 unconnected · contested
- Do not split test below readable traffic4 unconnected · contested
- Instrument the funnel before you guess at it4 unconnected
- Show the product running, not a picture of it4 unconnected