# Record a conversion for a click

Attributes a conversion to a click. Links with trackConversions enabled append ?esrx_id=<click id> to their destination; the customer's backend captures it and posts it here (typically with an org API key) when the visitor signs up or pays. Clicks are written asynchronously, so an instant conversion can 404 once — retry after a second. Idempotent on clickId+name: retrying the same clickId with the same name (a dropped response, an at-least-once webhook relay) returns 200 with the already-recorded conversion instead of creating a second one. A different name for the same clickId (e.g. "signup", then later "purchase") is a distinct event and is always accepted as a new 201.

Canonical: https://easerix.com/docs/developers/api/links/analytics/trackConversion

{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

export default function Layout(props) {
  const { APIPage, OpenAPIPage } = props.components ?? {};
  // "APIPage" is the old name from v10, this allows both for backward compatibility
  const Comp = OpenAPIPage ?? APIPage;
  return (
    <>
      {props.children}
      <Comp document="links" operations={[{"path":"/v1/track/conversion","method":"post"}]} />
    </>
  );
}
