← Form tracking demos Watch it fail

4 · Lead form → affiliate offer

One page: the visitor leaves their details and continues to a network offer. Two events should come out of it — the form submission and the outbound click — and the way these pages usually get built produces neither.

Links AutoTag handles on its own

The part that already works. Ordinary anchors to real network offers: AutoTag appends the sub-ID at page load, and a click on one is what produces an OutboundClick. Hover them and read the status bar.

Impact offer — Semrush (standard link) → gets subId1 appended

Cloaked link behind a redirect → also tagged, because data-tracking-group="impact" tells AutoTag what it is

PartnerStack offer — Typeform, plain not tagged. Read the note below.

Same link, with the Tracking Group attribute → gets sid2 appended

Not every network domain is recognised automatically — check, do not assume. Impact links are identified on sight, so sjv.io URLs get subId1 with no help. partnerlinks.io is not: the plain link above goes out with no sid2 and therefore no Click ID. Adding data-tracking-group="partnerstack" fixes it, as the second link shows.

The same thing is visible on AnyTrack's own PartnerStack documentation: the direct link in its Example 1 carries no sid2, while the wrapped link with the attribute does. Copy any offer link into a page, hover it, and confirm the sub-ID is really there before you send traffic — a link that looks fine and carries nothing is the expensive failure.
Impact vanity links cannot be tracked at all. A link like https://semrush.sjv.io/ORdo6P carries its parameters inside the short URL, so there is nowhere to append subId1. Use a standard link or a deeplink instead.

The way it usually gets built

Intercept the submit, then redirect to the offer in JavaScript. The visitor lands on the offer, so it looks correct.

Two events that never happen.
· No form submission. preventDefault() stops the browser completing the submit, so there is no submit for AutoTrack to collect.
· No OutboundClick. window.location.href = … is not a click on a link. AutoTag hooks anchors; a scripted navigation never touches one.
The Click ID itself is fine — the hidden field was substituted and the URL carries the right sub-ID. That is what makes it deceptive: the identifier is perfect and no event ever carries it.

The single-step version that works

Same one page, nothing intercepted. The form does a real POST to your own endpoint, which answers with a redirect to the offer. The browser completes the submit, so the form event fires; the lead travels in the request body, so no personal data is ever written into a URL.

Paste a webhook.site URL to watch the POST body arrive. In production this is your own handler, and it answers with 302 Location: <offer URL + sub-ID>.

Why POST and not GET. A GET form puts every field in the query string, so the email ends up in the address bar, in browser history, in server access logs, and in the Referer header sent to whatever the visitor lands on next. Personal data does not belong in any of those. A POST body goes none of those places.
The one thing POST does not give you: the OutboundClick. The visitor reaches the offer through your redirect, not by clicking an anchor, so there is nothing for AutoTag to hook. Attribution still works — the sub-ID travels on the redirect and comes back in the network's postback — but if you want the click recorded as an event, fire it yourself before the form leaves the page.

What the endpoint does

// POST /lead   (your handler)
app.post('/lead', function (req, res) {
  var clickId = req.body.click_id;          // travelled in the body, not the URL
  saveLead(req.body);                       // email stays server-side

  var offer = new URL('https://semrush.sjv.io/c/169033/1328754/13053');
  offer.searchParams.set('subId1', clickId); // Impact. PartnerStack expects sid2
  res.redirect(302, offer.toString());
});

Recording the outbound click anyway

form.addEventListener('submit', function () {
  // Do not preventDefault — the submit must complete for the form event to fire.
  AnyTrack(function () {
    AnyTrack('trigger', 'OutboundClick', {
      url:   offerUrl,          // destination
      label: 'Continue to offer' // anchor text, if there were one
    });
  });
});
Note what is missing there. No preventDefault(), no window.location.href. The handler only adds the event the redirect cannot produce, and then gets out of the way so the browser completes the submit.
The sub-ID parameter is not interchangeable. subId1 for Impact, sid2 for PartnerStack. Sending the Click ID in the wrong one gives you conversions with nothing to attribute them to.