Track outcomes, not just clicks
Define the event contract and count successful actions.
A button click is an intent signal. A successfully accepted lead or completed order is a business outcome. Decide which system knows that the outcome really happened and make it the event owner.
Your implementation route
Connect a custom domain and check your plan's eligibility. Use the native Google Analytics marketing integration and your G- measurement ID. If you already use GTM, choose one owner for the Google tag before connecting another integration.
Platform boundaries & account requirements
Use Wix's native integrations and SEO & GEO tools. Backend examples belong in a supported Wix backend module or an external service, never in a page embed.
Open Wix ↗A working form/checkout, a written event dictionary and access to the integration's success callback.
Follow the steps
Check only after completingWrite a small event dictionary
Start with page_view, generate_lead and purchase where applicable. For each, record trigger, owner, allowed parameters, consent requirement and verification method. Keep micro-actions such as phone_click separate from qualified leads.
Connect the success condition
Send generate_lead after the server confirms that the form was accepted, not on submit-button click. Use a low-cardinality form_id or service_type. Do not send the submitted personal details, form text or email address.
Choose one tracking owner
If the host's native integration already emits the event, use it or deliberately replace it. Do not emit another from an embed or server. Shopify uses documented customer events/app pixels; generic DOM callbacks are not checkout code.
Mark and test the meaningful outcome
In GA4 Admin, find the intended event and mark it as a key event when appropriate. Test success, validation failure, server error, retry and refresh. Compare a controlled set of submissions with the receiving system; a recorded event is not automatically a qualified lead.
Implementation recipes
Expand · choose · copy</>Emit only after accepted submissionOpen recipe
Custom browser form integration with an existing consent-aware tag. Connect this function to your confirmed-success callback. Replace the consent predicate with your CMP API. Native builder integrations may already own the event.
const recordedReceipts = new Set();
function recordAcceptedLead(receiptId) {
// receiptId comes from your successful server response, not user input.
if (!receiptId || recordedReceipts.has(receiptId)) return;
if (window.analyticsAllowed !== true) return; // Connect your actual CMP.
if (typeof window.gtag !== "function") return;
recordedReceipts.add(receiptId);
window.gtag("event", "generate_lead", {
form_id: "service_enquiry",
service_type: "heat_pump"
});
}
// Call recordAcceptedLead(result.receiptId) ONLY after server acceptance.
// This Set prevents duplicates in this page lifetime only.
// Cross-refresh/server retries need durable deduplication or one event owner.
// Do not send the receipt ID, email, name, phone or free-text message.Review the setup notes and replace example values before using this on your site.For a controlled successful test, the event appears once with only allowed parameters. Failed submissions produce no success event. Record expected and observed counts.
Disable the new event trigger/version, retain the basic tag, and fix the success callback or integration ownership before re-enabling.
Read the primary instructions
Guidance checked October 7, 2026. “2027” describes this prototype’s visual concept, not a prediction of platform rules.