Track lead origins with hidden fields and URL parameters

Track leads automatically with hidden fields and URL parameters.

Written By CrocoTeam

Last updated 2 months ago

CrocoClick lets you know where your leads come from, without any complex external tools. Thanks to hidden fields in your forms and URL parameters, you can automatically record the source, campaign, or marketing channel associated with each lead.

What is a hidden field?

A hidden field is a form field that is invisible to the visitor but can be filled in automatically if a value is present in the URL.

Simple example

  • URL: https://monlien.com/optin?source=instagram

  • Form with a hidden field called source

➞ The field will be automatically filled in with the value "instagram" without any action on the part of the user.

💡 TIP: You can pre-fill several hidden fields in the same URL.

Complete example:

https://monlien.com/optin?source=insta&email=bob@superdomaine.com&ad_name=story1

Why not just use the native "source" field?

Native source field (CrocoClick)

Custom hidden field

Automatically filled in by CrocoClick (first or last known source)

Filled in manually via the URL

Useful for overall statistics

Ideal for tracking a specific campaign

Can be modified if the contact returns via another channel

Does not change once injected

💡 TIP: Use a hidden field such as source2 to lock in the exact source from the outset, even if the contact then navigates elsewhere.

How to set up a hidden tracking field?

Step 1 — Add the field to the form

  1. Open your form in CrocoClick

  2. Add a hidden field and name it source2 (or according to your convention).

  3. Name it source, source2, or according to your logic (e.g., utm_campaign, canal, ad_name, etc.).

  4. Leave the value blank

Step 2 — Create your URL with the correct parameters

Add the data to be transmitted at the end of your URL:

https://monlien.com/optin?source2=instagram

TIP: there is no need to modify the URL, simply add ?name=yourdata at the end of the URL before sharing it

Each field in your form with the same name will be filled in with the corresponding value.

💡 TIP: To combine multiple data, use "&" between parameters:

?source2=partenariat&ad_name=reel3&landing=page_ete

How can you check that it works?

  1. Open your test URL containing the parameters in a private browsing window

  2. Fill out the form as a prospect would

  3. Go to Contacts > Contact Details

  4. Check the custom fields:

    • source2 = instagram

Best practices

  • Keep names simple and consistent

  • We recommend that you do not replace the native "source" field, as it serves as a "backup source" by automatically tracking certain parameters and UTMs

  • Always test your URLs before launching a campaign

Conclusion

Hidden fields + URL parameters allow you to improve the accuracy of your tracking and better understand where your prospects are coming from.

It's a simple but incredibly powerful tool for your future campaigns, analyses, and automations!