and runs during HTML parse, but hubspotutk is set by
js.hs-analytics.net, measured loading at ~834ms. On a first visit the cookie
does not exist yet, so a single read returns nothing and the visitor gets no
external ID at all — and a first visit is exactly what an ad click is. So
poll briefly until HubSpot sets it. The SDK loads lazily (~4.5s) and replays
a queue, so an init queued a second or two in still lands before any events
are transmitted. */
(function attachExternalId() {
var attempts = 0;
var MAX_ATTEMPTS = 40; /* 40 x 200ms = 8s, then give up quietly */
var timer = null;
function tryAttach() {
var raw = getExternalId();
if (!raw) {
if (++attempts >= MAX_ATTEMPTS && timer) clearInterval(timer);
return;
}
if (timer) clearInterval(timer);
sha256Hex(raw).then(function (hash) {
oaiq("init", { user: { external_id_sha256: hash } });
}).catch(function () {});
}
tryAttach(); /* returning visitor: immediate */
if (!getExternalId()) timer = setInterval(tryAttach, 200);
})();
/* ---------------------------------------------------------------------------
2. Load the SDK off the critical path
Whichever comes first: the main thread going idle after load, or the first
sign of real user intent. No preconnect on purpose — a TLS handshake during
LCP for a script we deliberately deferred is a net loss.
Measured on clickpost.ai: load event 3614ms, SDK fetched 4508ms.
------------------------------------------------------------------------ */
var loaded = false;
var INTENT = ["pointerdown", "keydown", "scroll"];
function loadSdk() {
if (loaded) return;
loaded = true;
INTENT.forEach(function (t) { removeEventListener(t, loadSdk, { passive: true }); });
var s = document.createElement("script");
s.src = SDK;
s.async = true;
s.fetchPriority = "low";
document.head.appendChild(s);
}
INTENT.forEach(function (t) {
addEventListener(t, loadSdk, { passive: true, once: true });
});
addEventListener("load", function () {
window.requestIdleCallback
? requestIdleCallback(loadSdk, { timeout: 2500 })
: setTimeout(loadSdk, 1500);
}, { once: true });
/* ---------------------------------------------------------------------------
3. Conversion id
sha256(lowercase(email) + "|" + formId + "|" + ISO-hour), first 20 hex,
"lead_" prefix.
- email lowercased/trimmed so casing does not fork the id
- formId keeps two different forms in the same hour from colliding
- the hour bucket is only the server's fallback; the id computed here is
sent to the relay verbatim, so the two paths cannot disagree even when
a submit straddles an hour boundary
Ads Manager's own sample omits event_id. We send it so the pixel event and
the relay event collapse into one conversion instead of counting twice.
------------------------------------------------------------------------ */
function buildEventId(email, formId) {
var seed = [
String(email || "").trim().toLowerCase(),
String(formId || ""),
new Date().toISOString().slice(0, 13)
].join("|");
return crypto.subtle.digest("SHA-256", new TextEncoder().encode(seed)).then(function (buf) {
var hex = Array.prototype.map.call(new Uint8Array(buf), function (b) {
return b.toString(16).padStart(2, "0");
}).join("");
return "lead_" + hex.slice(0, 20);
});
}
/* Guards a re-fire from the history.pushState that book-a-demo-core.js runs
after submit, and from back-navigation onto the same state. */
function firedOnce(id) {
try {
if (sessionStorage.getItem("oaiq_" + id)) return true;
sessionStorage.setItem("oaiq_" + id, "1");
return false;
} catch (e) {
return false; /* private mode / blocked storage: fire rather than lose it */
}
}
/* Path 2. keepalive lets the request finish even if the page navigates away.
Failures are swallowed deliberately: a reporting call must never surface an
error to someone who just submitted a form.
The relay hashes the email server-side into user.emails_sha256 and adds the
caller's IP and user agent, so this event carries the same match signals the
pixel gets for free. */
function sendToRelay(email, formId, eventType, eventId) {
try {
var payload = {
token: RELAY_TOKEN,
email: email,
form_id: formId || "",
event_type: eventType,
event_id: eventId, /* verbatim, so both paths always match */
source_url: location.href
};
var oppref = getOppref();
if (oppref) payload.oppref = oppref;
var externalId = getExternalId();
if (externalId) payload.external_id = externalId;
fetch(RELAY_URL, {
method: "POST",
keepalive: true,
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload)
}).catch(function () {});
} catch (e) {}
}
/* Capture the email while the form is still on the page. onFormSubmitted does
not reliably carry submissionValues, and by then the form may be removed. */
var lastEmail = "";
document.addEventListener("submit", function (e) {
var f = e.target;
if (!f || !f.querySelector) return;
var i = f.querySelector('input[name="email"], input[type="email"]');
if (i && i.value) lastEmail = i.value;
}, true);
/* Every HubSpot form on the site reports through this one message event, so no
module or theme JS needs editing to add coverage. */
window.addEventListener("message", function (e) {
var d = e.data;
if (!d || d.type !== "hsFormCallback" || d.eventName !== "onFormSubmitted") return;
var email = (d.data && d.data.submissionValues && d.data.submissionValues.email) || lastEmail;
if (!email) return; /* without an email there is no stable id to dedupe on */
var eventType = EVENT_BY_FORM[d.id] || EVENT_DEFAULT;
buildEventId(email, d.id).then(function (id) {
if (firedOnce(id)) return;
oaiq("measure", eventType, { type: DATA_TYPE }, { event_id: id }); /* path 1 */
sendToRelay(email, d.id, eventType, id); /* path 2 */
});
});
})();
Post-Purchase, Built for How Electronics Brands Deliver
Branded tracking, delivery updates, and streamlined returns for electronics brands shipping high-value orders. Cut WISMO and protect margin with ClickPost.
Electronics carries the highest order value and the most delivery risk in retail.
Shoppers spend more per order and worry about theft, damage, and whether the box will actually work, so every delivery and every return carries real weight.
No fault found sends it back
Most returned electronics work fine. Setup confusion, compatibility, and second thoughts drive returns that a refund never solves, so the margin and the customer both walk out the door.
High value spikes WISMO and theft worry
A high-value parcel gets tracked obsessively and makes an easy target for porch theft. Every launch and every holiday floods support with status and "where is it" tickets.
15–20%
of consumer electronics orders are returned, above the retail average near 19%.
up to 65%
of returned electronics are found to have no fault at all.
20–50%
of an order's value can be lost to return shipping, testing, and restocking.
80%+
of shoppers track a high-value order daily until it arrives.
Return-rate benchmarks from National Retail Federation, Statista, and Shopify category research
HOW CLICKPOST HELPS
Own the whole journey from doorstep to the way back
ClickPost runs tracking, returns, exchanges, and carrier decisions from one platform, so every post-purchase moment builds trust instead of tickets.
Keep anxious buyers on your brand, not the carrier's site
Proactive updates by email and SMS at every milestone, plus a branded tracking page that looks like your store. High-value buyers stop refreshing the carrier site and stop opening tickets.
Mobile-first branded tracking page
Milestone alerts by email, SMS, and push
Estimated delivery dates that set expectations
Use case
An audio brand sends proactive SMS at every milestone on a high-value order, keeping the buyer on a branded page instead of the carrier site.
Business impact
Up to 60% lower WISMO queries and calmer buyers on the brand's own domain.
Turn a return into a fix or an exchange, not a refund
A self-service portal offers setup help and compatibility checks first, then an exchange or replacement, so a working unit is not lost to a refund.
Branded self-service returns portal
Troubleshooting and exchange prompts before refund
Return tracking so shoppers stop chasing status
Use case
A buyer starts a return for headphones that "will not pair." The portal walks through pairing, resolves it, and cancels the return.
Business impact
Fewer no-fault returns and more revenue kept inside the brand.
Catch delayed and stuck high-value parcels early
Electronics ships across UPS, USPS, FedEx, and regional carriers, and a lost high-value parcel is an expensive claim. ClickPost tracks every parcel in one place and flags delayed and stuck shipments early.
Unified tracking across US carriers
Early alerts on delayed and stuck shipments
Accurate delivery dates that hold up at peak
Use case
During a launch, a brand catches 150+ delayed shipments in the control tower and notifies customers before they open tickets or file claims.
Business impact
Exceptions resolved before customers notice, fewer claims and higher NPS.
Feed return reasons back into product and support docs
See why units come back by SKU, reason, and firmware, then act on it. Return data becomes a signal for your product pages, setup guides, and QA.
Return reason and exchange reporting
Carrier and delivery performance visibility
Signals your product and support teams can use
Use case
Analytics show a speaker has 30% returns for "will not connect." The team rewrites the setup guide and the return rate falls.
Business impact
Higher customer NPS and clear data for product and support decisions.
BEYOND TRACKING AND RETURNS
Keep more of every order, and grow it.
Electronics buyers second-guess the spec, worry about the parcel, and keep opening the order page. ClickPost adds three revenue moves built for exactly that behavior.
BEFORE IT SHIPS · ORDER EDITING
Let shoppers fix the order before the box leaves
Customers correct model, color, quantity, and address themselves from the order page, inside a window you set, so a wrong pick gets fixed instead of shipped and returned.
Self-serve shade, variant, and address edits
Address validation pre-dispatch
Merchant-set edit window with 3PL sync
30%fewer order-change tickets
PROTECT REVENUE · RETURNS PROTECTION
Stop no-fault and serial returns from eating margin
ClickPost segments high-risk shoppers and applies eligibility rules by customer, region, or SKU, and protects high-value parcels against loss and damage in transit.
AI segments serial returners
Eligibility enforcement by customer or SKU
Package protection for lost or damaged orders
30%of returns revenue protected
GROW AOV · POST-PURCHASE UPSELL
Sell the accessories while attention is high
ClickPost surfaces AI-picked accessories and warranties on tracking and order pages and inside the returns flow, so a single order becomes a bigger basket.
AI recommendations on tracking pages
Accessories and warranties during returns flow
Upsell revenue that lifts AOV
+AOVfrom post-purchase recommendations
GETTING STARTED
Live on ClickPost without rebuilding your stack
Connect your store and carriers
Plug ClickPost into Shopify or your commerce platform and link your US carriers through a single API.
Brand tracking and returns
Match the tracking page, returns portal, and notifications to your look and voice. Set exchange rules once.
Watch WISMO and refunds drop
Proactive updates cut support load and exchange prompts hold revenue. Analytics show what is working.
THE LEADER IN POST-PURCHASE
Powering 600+ leading retail brands
From the first tracking scan to the final return, ClickPost powers everything that happens after checkout.
We’ve been using Clickpost and it’s genuinely been super helpful. The post-purchase upsells have been a solid bonus for incremental revenue.
Samarth Sindhi
Chief Executive Officer, MarsGHC
ClickPost’s team were experts in their systems and integrated seamlessly with ours. They proactively resolved every issue, ensuring a smooth experience.
Sonali Das
D2C Tech and Product Head, Birkenstock
Great experience and fantastic support from ClickPost. This immediately cut our top post-purchase support tickets, making ROI easy to quantify. Plus, the customization features and upsell tools help increase AOV. Highly recommend.
Paul Fulton
VanillaPura
ClickPost helped us create a return experience that fit our business instead of forcing us to fit the platform. They customized our workflows without additional costs or developer support. The automation they built for our returns, freed up 5 hours a week.
Sandy Vangyi
Director of CX, GOPURE
Proof & recognition
Rated 4.8 on G2. Named a Leader in returns. Enterprise-grade security.
Enterprise-grade certifications
ISO 27001
SOC 2 Type II
GDPR Compliant
CCPA Compliant
4.7
4.4
Protect High-Value Orders From Cart to Doorstep
Track fragile, high-AOV orders closely and manage warranty returns from one place. Book a 30-minute demo mapped to your shipments.