1. AnyTrack Knowledge Base
  2. How to Guides and Recipes

How to track form submissions with AnyTrack

Learn how to track form submissions and leverage the AnyTrack Click ID across your funnels and tools.

AnyTrack's AutoTrack function automatically tracks form submission and sends a FormSubmit event to your analytics and ad pixels.

Very much like with any other conversion event, AnyTrack generates a unique click_id which will allow you to tie the event to an ad campaign or marketing channel.

Important reminders:

  • The AnyTrack Click ID is a unique and anonymous identifier that is autogenerated by the AnyTrack Tag when a visitor triggers an Event on your website.
  • Events are actions such as Outbound Clicks, Form Submissions,  Add To Cart etc... Some Events are automatically tracked (we call this function AutoTrack), but they can also be instrumented by the AnyTrack Event tracking snippet.
  • At run time, the Click ID is emitted in the browser, recorded by the AnyTrack servers and can also be submitted with the form data or appended to the cart, offer link or product link. We call this function AutoTag.
  • When the Click ID is forwarded to a destination (form, cart, link etc...) it serves as the key that enables server side tracking via webhook, postback or API. In short, it's the key that enables AnyTrack to match an Event that happened on your website and an Event that happens offline (offline meaning that it's outside the reach of the AnyTrack JS tag).
    • Affiliate networks
    • Payment gateways
    • CRM platforms
  • Offline events are sent to AnyTrack via Webhook, Postback URL, or fetched via API, and can only be matched with the AnyTrack Click ID value.

If you're not yet familiar with Server Side Tracking we highly recommend going through the article

Prerequisites to track form submissions:

  • The AnyTrack Tag must be on the website head section
  • The form must carry standard html form markup
  • For advanced tracking: you've set a hidden field with the default value token --CLICK-ID--

Note:

By default AutoTrack is disabled when the form doesn't carry the click id parameter. If you want to enable AutoTrack for any tracked form, you can update the Client Side Tracking settings in the property settings.

How AnyTrack form tracking works

Basic form tracking

AnyTrack automatically captures standard form submission events emitted by the browser and forwards these events to your ad pixels and analytics connected to your AnyTrack account.

Learn more about form standard formatting on Mozilla's developer website.

If you've enabled the settings in the property, you can see these events happening in real-time through Google Analytics' real-time dashboard.

0fcad1d9418fa01f82749b34f22d5943

Advanced form tracking

Advanced form tracking is when you want to go a step further and use the AnyTrack click_id in your CRM in order to track additional conversion events that don't happen when the visitor is on your site.

For example, if your sales team works with Hubspot or Salesforce, your contacts go through multiple stages which you will want to track and attribute to your ads.

Hubspot sales cycle

Form URL

By adding the  --CLICK-ID-- placeholder on the form Action URL AnyTrack will substitute the placeholder with a Click ID value and upon submission the value will be sent to the destination URL / CRM.

Important Note!

For the Click ID to be recorded in your CRM you must first create the field / property in the CRM settings. 

Consult with your CRM to find out how it can be done.

<form action="/action_page.php?clickid=fATP5qZnwZMaPAZMvwMtXKErn8w7rAt5" method="post" id="optin123" name="optin" data-payout="10">
  <input type="text" id="fname" name="fname" value="John"><br>
  <input type="text" id="lname" name="lname" value="Doe"><br>
  <input type="email" id="email" name="email" value="hello@gmail.foo"><br>
<input type="submit" value="Submit">
</form>

Form input

If you don't want to change the form URL you can add a hidden field with a default value set as --CLICK-ID-- placeholder.

<form action="/action_page.php" method="post" id="optin123" name="optin" data-payout="10">
  <input type="text" id="fname" name="fname" value="John"><br>
  <input type="text" id="lname" name="lname" value="Doe"><br>
  <input type="email" id="email" name="email" value="hello@gmail.foo"><br>
<input type="hidden" id="subid1" name="clickid" value="--CLICK-ID--"><br>
  <input type="submit" value="Submit">
</form>

Tracking "Unknown Forms"

By default, AnyTrack does not track untagged forms like logins, or blog comments. But if you would like to track any forms, regardless of whether they are tagged or not, you can update the default settings.

If you wish to track all form submissions, you can update your property settings and configure an event name for all unknown form submits:

mceclip0.png