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.
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
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.
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.
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.
Intercept the submit, then redirect to the offer in JavaScript. The visitor lands on the offer, so it looks correct.
preventDefault() stops the browser
completing the submit, so there is no submit for AutoTrack to collect.
window.location.href = … is not a click on
a link. AutoTag hooks anchors; a scripted navigation never touches one.
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>.
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.
// 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());
});
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
});
});
});
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.
subId1 for Impact,
sid2 for PartnerStack. Sending the Click ID in the wrong one gives you conversions
with nothing to attribute them to.