Optional purchase amount in major units (e.g. 49.99). Stored as minor units server-side.
currency
string?
Optional ISO 4217 currency (e.g. USD). Required when amount is set; defaults to USD if omitted with an amount.
type
”transaction”
The tracker sends transaction events with the transaction event type automatically.
path
string
The current page path where the transaction was recorded.
sessionId
string
The browser session ID associated with the conversion.
When to call it
Call transactions only after the payment, upgrade, or conversion has succeeded. The safest place is usually a success page or a client-side callback after your server confirms the purchase.
Do not call transaction tracking before payment confirmation. Otherwise abandoned checkouts can look like revenue.
// Still valid — name only, no amountwindow.openrevenue.transaction("newsletter_signup")
Amounts vs payment providers
Tracker transactions store the event name, optional amount/currency, and visit context. They do not replace payment-provider webhooks — connect Stripe, Polar, or another provider with Revenue integrations for order-level attribution, refunds, and MRR-style reporting. Avoid double-counting the same sale in both places.
Tracker amounts show up on the project Events page and Goals → Events tab (and GET /events). Use Revenue integrations when you already have a payment provider for order-level attribution, refunds, and MRR-style reporting.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"OpenRevenue Documentation","description":"Guides and API reference for OpenRevenue, the revenue-first, privacy-friendly web analytics platform.","colors":{"primary":"#FF6A00","light":"#FF8A3D","dark":"#E65F00"},"logo":{"light":"https://mintcdn.com/openrevenue/J1l4-iBBUEFWlkEV/logo/light.svg?fit=max\u0026auto=format\u0026n=J1l4-iBBUEFWlkEV\u0026q=85\u0026s=b6aaaa596c2fdec956ef9bf89504cbe8","dark":"https://mintcdn.com/openrevenue/J1l4-iBBUEFWlkEV/logo/dark.svg?fit=max\u0026auto=format\u0026n=J1l4-iBBUEFWlkEV\u0026q=85\u0026s=21e889cdcab926dc84a432170328a88a","href":"https://www.openrevenue.com"},"favicon":"https://mintcdn.com/openrevenue/J1l4-iBBUEFWlkEV/favicon.svg?fit=max\u0026auto=format\u0026n=J1l4-iBBUEFWlkEV\u0026q=85\u0026s=05cdaf97843f04bc86712beeab8836b2","api":{"playground":{"display":"interactive"},"mdx":{"auth":{"method":"bearer"},"server":"https://api.openrevenue.com"}},"appearance":{"default":"system"},"background":{"color":{"light":"#FFFFFF","dark":"#101011"}},"navbar":{"links":[{"href":"https://www.openrevenue.com/pricing","label":"Pricing"},{"href":"https://www.openrevenue.com/blog","label":"Blog"}],"primary":{"type":"button","label":"Dashboard","href":"https://www.openrevenue.com/dashboard"}},"footer":{"links":[{"header":"Product","items":[{"label":"Pricing","href":"https://www.openrevenue.com/pricing"},{"label":"Live demo","href":"https://www.openrevenue.com/demo/nike.com"},{"label":"Public API","href":"https://www.openrevenue.com/account/api"},{"label":"ChatGPT plugin","href":"https://chatgpt.com/plugins/plugin_asdk_app_6a7ec2575360819190063dd4bcf6bfb5"},{"label":"Start free trial","href":"https://www.openrevenue.com/auth/signup"}]},{"header":"Capabilities","items":[{"label":"Revenue attribution","href":"https://www.openrevenue.com/revenue-attribution"},{"label":"Visitor profiles","href":"https://www.openrevenue.com/visitor-profiles"},{"label":"Realtime","href":"https://www.openrevenue.com/realtime"},{"label":"Performance","href":"https://www.openrevenue.com/performance"},{"label":"Funnels","href":"https://www.openrevenue.com/funnels"},{"label":"AI assistant","href":"https://www.openrevenue.com/ai-assistant"},{"label":"Embeddable widgets","href":"https://www.openrevenue.com/embeddable-widgets"}]},{"header":"Resources","items":[{"label":"Blog","href":"https://www.openrevenue.com/blog"},{"label":"Crawlers","href":"https://www.openrevenue.com/crawlers"},{"label":"Data","href":"https://www.openrevenue.com/data"},{"label":"Status","href":"https://status.openrevenue.com"},{"label":"Contact","href":"https://www.openrevenue.com/contact"}]},{"header":"Legal","items":[{"label":"Terms of Service","href":"https://www.openrevenue.com/terms"},{"label":"Privacy Policy","href":"https://www.openrevenue.com/privacy"},{"label":"DPA","href":"https://www.openrevenue.com/dpa"},{"label":"GDPR","href":"https://www.openrevenue.com/gdpr"},{"label":"Security","href":"https://www.openrevenue.com/security"}]}]},"search":{"prompt":"Search the docs..."},"seo":{"metatags":{"canonical":"https://docs.openrevenue.com","og:site_name":"OpenRevenue","og:locale":"en_US","twitter:site":"@openrevenue_"},"indexing":"navigable"},"fonts":{"family":"Inter"},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":{"light":"one-light","dark":"one-dark-pro"}},"latex":false},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"navigation":{"global":{"anchors":[{"anchor":"Status","icon":"activity","href":"https://status.openrevenue.com"},{"anchor":"Support","icon":"life-buoy","href":"mailto:support@openrevenue.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"openrevenue","hasAudioNarration":false,"actualSubdomain":"openrevenue","customDomains":["docs.openrevenue.com"],"gitSource":{"type":"github","owner":"eggerco","repo":"openrevenue","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":"","_id":"6afae29ad57358ecbcbff576"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6aff2fcf42e7ae4824d61256","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"Documentation","count":25},{"language":"default","tag":"API reference","count":22},{"language":"default","tag":"Project API","count":17},{"language":"default","tag":"Advanced","count":15},{"language":"default","tag":"Installation","count":8},{"language":"default","tag":"Account API","count":4},{"language":"default","tag":"Getting started","count":2},{"language":"default","tag":"MCP","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"h1,h2,h3{letter-spacing:-0.015em}"}]}
{"page":{"pagePath":"advanced/transactions","slug":"/advanced/transactions","pageMetadata":{"title":"Transactions","description":"Send transaction events to OpenRevenue so revenue and conversion value can appear in analytics reports.","keywords":["revenue","purchase"],"icon":"receipt","href":"/advanced/transactions"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Send transaction events to OpenRevenue so revenue and conversion value can appear in analytics reports.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`track-transaction`,children:`Track a transaction`}),`\n`,_jsxs(_components.p,{children:[`The browser tracker exposes `,_jsx(_components.code,{children:`window.openrevenue.transaction()`}),`. Pass a stable name, and optionally an amount in major units with an ISO currency code.`]}),`\n`,_jsx(CodeBlock,{filename:`checkout-success.ts`,numberOfLines:`4`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes one-light one-dark-pro`,style:{backgroundColor:`#FAFAFA`,\"--shiki-dark-bg\":`#282c34`,color:`#383A42`,\"--shiki-dark\":`#abb2bf`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#E5C07B`},children:`window`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#E45649`,\"--shiki-dark\":`#E5C07B`},children:`openrevenue`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#4078F2`,\"--shiki-dark\":`#61AFEF`},children:`transaction`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`(`}),_jsx(_components.span,{style:{color:`#50A14F`,\"--shiki-dark\":`#98C379`},children:`\"checkout_completed\"`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E45649`,\"--shiki-dark\":`#E06C75`},children:` amount`}),_jsx(_components.span,{style:{color:`#0184BC`,\"--shiki-dark\":`#ABB2BF`},children:`:`}),_jsx(_components.span,{style:{color:`#986801`,\"--shiki-dark\":`#D19A66`},children:` 49.99`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E45649`,\"--shiki-dark\":`#E06C75`},children:` currency`}),_jsx(_components.span,{style:{color:`#0184BC`,\"--shiki-dark\":`#ABB2BF`},children:`:`}),_jsx(_components.span,{style:{color:`#50A14F`,\"--shiki-dark\":`#98C379`},children:` \"USD\"`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`})`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Name`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`eventName`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`The transaction label stored with the event.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`amount`})}),_jsx(_components.td,{children:`number?`}),_jsx(_components.td,{children:`Optional purchase amount in major units (e.g. 49.99). Stored as minor units server-side.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`currency`})}),_jsx(_components.td,{children:`string?`}),_jsx(_components.td,{children:`Optional ISO 4217 currency (e.g. USD). Required when amount is set; defaults to USD if omitted with an amount.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.td,{children:`”transaction”`}),_jsx(_components.td,{children:`The tracker sends transaction events with the transaction event type automatically.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`path`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`The current page path where the transaction was recorded.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sessionId`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`The browser session ID associated with the conversion.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`when-to-call`,children:`When to call it`}),`\n`,_jsx(_components.p,{children:`Call transactions only after the payment, upgrade, or conversion has succeeded. The safest place is usually a success page or a client-side callback after your server confirms the purchase.`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Do not call transaction tracking before payment confirmation. Otherwise abandoned checkouts can look like revenue.`})}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsx(CodeBlock,{filename:`success.tsx`,numberOfLines:`3`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes one-light one-dark-pro`,style:{backgroundColor:`#FAFAFA`,\"--shiki-dark-bg\":`#282c34`,color:`#383A42`,\"--shiki-dark\":`#abb2bf`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4078F2`,\"--shiki-dark\":`#61AFEF`},children:`useEffect`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`(() `}),_jsx(_components.span,{style:{color:`#A626A4`,\"--shiki-dark\":`#C678DD`},children:`=>`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E45649`,\"--shiki-dark\":`#E5C07B`},children:` window`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#E45649`,\"--shiki-dark\":`#E5C07B`},children:`openrevenue`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#4078F2`,\"--shiki-dark\":`#61AFEF`},children:`transaction`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`(`}),_jsx(_components.span,{style:{color:`#50A14F`,\"--shiki-dark\":`#98C379`},children:`\"pro_upgrade\"`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`, { `}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#E06C75`},children:`amount`}),_jsx(_components.span,{style:{color:`#0184BC`,\"--shiki-dark\":`#ABB2BF`},children:`:`}),_jsx(_components.span,{style:{color:`#986801`,\"--shiki-dark\":`#D19A66`},children:` 29`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`, `}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#E06C75`},children:`currency`}),_jsx(_components.span,{style:{color:`#0184BC`,\"--shiki-dark\":`#ABB2BF`},children:`:`}),_jsx(_components.span,{style:{color:`#50A14F`,\"--shiki-dark\":`#98C379`},children:` \"USD\"`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:` })`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`}, [])`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:`checkout.ts`,numberOfLines:`6`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes one-light one-dark-pro`,style:{backgroundColor:`#FAFAFA`,\"--shiki-dark-bg\":`#282c34`,color:`#383A42`,\"--shiki-dark\":`#abb2bf`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#A626A4`,\"--shiki-dark\":`#C678DD`},children:`if`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:` (`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#E5C07B`},children:`checkout`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#E45649`,\"--shiki-dark\":`#E06C75`},children:`status`}),_jsx(_components.span,{style:{color:`#0184BC`,\"--shiki-dark\":`#56B6C2`},children:` ===`}),_jsx(_components.span,{style:{color:`#50A14F`,\"--shiki-dark\":`#98C379`},children:` \"complete\"`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#E5C07B`},children:` window`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#E45649`,\"--shiki-dark\":`#E5C07B`},children:`openrevenue`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#4078F2`,\"--shiki-dark\":`#61AFEF`},children:`transaction`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`(`}),_jsx(_components.span,{style:{color:`#50A14F`,\"--shiki-dark\":`#98C379`},children:`\"checkout_completed\"`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E45649`,\"--shiki-dark\":`#E06C75`},children:` amount`}),_jsx(_components.span,{style:{color:`#0184BC`,\"--shiki-dark\":`#ABB2BF`},children:`:`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#E5C07B`},children:` checkout`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#E45649`,\"--shiki-dark\":`#E06C75`},children:`total`}),_jsx(_components.span,{style:{color:`#0184BC`,\"--shiki-dark\":`#56B6C2`},children:` /`}),_jsx(_components.span,{style:{color:`#986801`,\"--shiki-dark\":`#D19A66`},children:` 100`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E45649`,\"--shiki-dark\":`#E06C75`},children:` currency`}),_jsx(_components.span,{style:{color:`#0184BC`,\"--shiki-dark\":`#ABB2BF`},children:`:`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#E5C07B`},children:` checkout`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#E45649`,\"--shiki-dark\":`#E06C75`},children:`currency`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`}`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:`name-only.ts`,numberOfLines:`2`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes one-light one-dark-pro`,style:{backgroundColor:`#FAFAFA`,\"--shiki-dark-bg\":`#282c34`,color:`#383A42`,\"--shiki-dark\":`#abb2bf`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#A0A1A7`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#7F848E`,\"--shiki-dark-font-style\":`italic`},children:`// Still valid — name only, no amount`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#E5C07B`},children:`window`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#E45649`,\"--shiki-dark\":`#E5C07B`},children:`openrevenue`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#4078F2`,\"--shiki-dark\":`#61AFEF`},children:`transaction`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`(`}),_jsx(_components.span,{style:{color:`#50A14F`,\"--shiki-dark\":`#98C379`},children:`\"newsletter_signup\"`}),_jsx(_components.span,{style:{color:`#383A42`,\"--shiki-dark\":`#ABB2BF`},children:`)`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`limits`,children:`Amounts vs payment providers`}),`\n`,_jsxs(_components.p,{children:[`Tracker transactions store the event name, optional amount/currency, and visit context. They do not replace payment-provider webhooks — connect Stripe, Polar, or another provider with `,_jsx(_components.a,{href:`/advanced/revenue`,children:`Revenue integrations`}),` for order-level attribution, refunds, and MRR-style reporting. Avoid double-counting the same sale in both places.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Tracker amounts show up on the project Events page and Goals → Events tab (and `,_jsx(_components.a,{href:`/api/project-api/events`,children:`GET /events`}),`). Use Revenue integrations when you already have a payment provider for order-level attribution, refunds, and MRR-style reporting.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"one-light","dark":"one-dark-pro"}},"config":{},"pageMetadata":{"title":"Transactions","description":"Send transaction events to OpenRevenue so revenue and conversion value can appear in analytics reports.","keywords":["revenue","purchase"],"icon":"receipt","href":"/advanced/transactions"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Track a transaction","slug":"track-transaction","depth":2,"children":[]},{"title":"When to call it","slug":"when-to-call","depth":2,"children":[]},{"title":"Examples","slug":"examples","depth":2,"children":[]},{"title":"Amounts vs payment providers","slug":"limits","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/openrevenue/210906b708c245a1/anchor-redirects.js","/_mintlify/custom/openrevenue/c5c29fe173162547/openrevenue-tracker.js"],"subdomain":"openrevenue","siteName":"OpenRevenue Documentation","title":"Transactions - OpenRevenue Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-16T13:20:26.583Z","originalFileLocation":"advanced/transactions.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Send transaction events to OpenRevenue so revenue and conversion value can appear in analytics reports.\">\u003cmeta data-mint-head name=\"application-name\" content=\"OpenRevenue Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/openrevenue/B427Cx3R8QFicYQk/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/openrevenue/B427Cx3R8QFicYQk/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/openrevenue/B427Cx3R8QFicYQk/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/openrevenue/B427Cx3R8QFicYQk/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/openrevenue/B427Cx3R8QFicYQk/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/openrevenue/B427Cx3R8QFicYQk/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/openrevenue/B427Cx3R8QFicYQk/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/openrevenue/B427Cx3R8QFicYQk/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/openrevenue/B427Cx3R8QFicYQk/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Transactions - OpenRevenue Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Send transaction events to OpenRevenue so revenue and conversion value can appear in analytics reports.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"OpenRevenue\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.openrevenue.com/advanced/transactions\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://openrevenue.mintlify.site/_mintlify/api/og/v2?division=Advanced\u0026amp;title=Transactions\u0026amp;description=Send+transaction+events+to+OpenRevenue+so+revenue+and+conversion+value+can+appear+in+analytics+reports.\u0026amp;theme=964c81b8eb93cf8ceccc844c\u0026amp;signature=535cb278b33bb3e2ca208f65a2f8240b0dee132b5c8c8961297f1b4b056c53f7\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Transactions - OpenRevenue Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Send transaction events to OpenRevenue so revenue and conversion value can appear in analytics reports.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://openrevenue.mintlify.site/_mintlify/api/og/v2?division=Advanced\u0026amp;title=Transactions\u0026amp;description=Send+transaction+events+to+OpenRevenue+so+revenue+and+conversion+value+can+appear+in+analytics+reports.\u0026amp;theme=964c81b8eb93cf8ceccc844c\u0026amp;signature=535cb278b33bb3e2ca208f65a2f8240b0dee132b5c8c8961297f1b4b056c53f7\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/openrevenue/B427Cx3R8QFicYQk/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"OpenRevenue Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FF6A00\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.openrevenue.com/advanced/transactions\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/advanced/transactions.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.openrevenue.com/#organization\",\"name\":\"OpenRevenue Documentation\",\"url\":\"https://docs.openrevenue.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/openrevenue/J1l4-iBBUEFWlkEV/logo/light.svg?fit=max\u0026auto=format\u0026n=J1l4-iBBUEFWlkEV\u0026q=85\u0026s=b6aaaa596c2fdec956ef9bf89504cbe8\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.openrevenue.com#website\",\"name\":\"OpenRevenue Documentation\",\"url\":\"https://docs.openrevenue.com\",\"publisher\":{\"@id\":\"https://docs.openrevenue.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.openrevenue.com/advanced/transactions#webpage\",\"url\":\"https://docs.openrevenue.com/advanced/transactions\",\"name\":\"Transactions\",\"description\":\"Send transaction events to OpenRevenue so revenue and conversion value can appear in analytics reports.\",\"dateModified\":\"2026-11-16T13:20:26.583Z\",\"isPartOf\":{\"@id\":\"https://docs.openrevenue.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.openrevenue.com/advanced/transactions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.openrevenue.com/advanced/transactions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Advanced\",\"item\":\"https://docs.openrevenue.com/advanced/realtime\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Transactions\",\"item\":\"https://docs.openrevenue.com/advanced/transactions\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.openrevenue.com/advanced/transactions#article\",\"headline\":\"Transactions\",\"name\":\"Transactions\",\"description\":\"Send transaction events to OpenRevenue so revenue and conversion value can appear in analytics reports.\",\"url\":\"https://docs.openrevenue.com/advanced/transactions\",\"mainEntityOfPage\":{\"@id\":\"https://docs.openrevenue.com/advanced/transactions#webpage\"},\"dateModified\":\"2026-11-16T13:20:26.583Z\",\"keywords\":\"revenue, purchase\",\"publisher\":{\"@id\":\"https://docs.openrevenue.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.openrevenue.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"OpenRevenue Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"OpenRevenue Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/advanced/transactions.md","siteName":"OpenRevenue Documentation","nav":{"global":{"anchors":[{"anchor":"Status","icon":"activity","href":"https://status.openrevenue.com"},{"anchor":"Support","icon":"life-buoy","href":"mailto:support@openrevenue.com"}]},"tabs":[{"tab":"Documentation","icon":"book-open","groups":[{"group":"Getting started","pages":[{"title":"Welcome to OpenRevenue","sidebarTitle":"Introduction","icon":"house","href":""},{"title":"Installation","icon":"download","href":"/installation"}]},{"group":"Installation","pages":[{"title":"HTML installation","sidebarTitle":"HTML","icon":"https://mintlify.s3.us-west-1.amazonaws.com/openrevenue/images/frameworks/html.svg","href":"/installation/html"},{"title":"Next.js installation","sidebarTitle":"Next.js","icon":"https://mintlify.s3.us-west-1.amazonaws.com/openrevenue/images/frameworks/next.svg","href":"/installation/nextjs"},{"title":"React installation","sidebarTitle":"React","icon":"https://mintlify.s3.us-west-1.amazonaws.com/openrevenue/images/frameworks/react.svg","href":"/installation/react"},{"title":"Vue.js installation","sidebarTitle":"Vue.js","icon":"https://mintlify.s3.us-west-1.amazonaws.com/openrevenue/images/frameworks/vue.svg","href":"/installation/vue"},{"title":"Nuxt installation","sidebarTitle":"Nuxt","icon":"https://mintlify.s3.us-west-1.amazonaws.com/openrevenue/images/frameworks/nuxt.svg","href":"/installation/nuxt"},{"title":"SvelteKit installation","sidebarTitle":"SvelteKit","icon":"https://mintlify.s3.us-west-1.amazonaws.com/openrevenue/images/frameworks/svelte.svg","href":"/installation/sveltekit"},{"title":"Astro installation","sidebarTitle":"Astro","icon":"https://mintlify.s3.us-west-1.amazonaws.com/openrevenue/images/frameworks/astro.svg","href":"/installation/astro"},{"title":"Angular installation","sidebarTitle":"Angular","icon":"https://mintlify.s3.us-west-1.amazonaws.com/openrevenue/images/frameworks/angular.svg","href":"/installation/angular"}]},{"group":"Advanced","pages":[{"title":"Realtime","icon":"globe","href":"/advanced/realtime"},{"title":"Custom events","icon":"mouse-pointer-click","href":"/advanced/custom-events"},{"title":"Funnels","description":"Build conversion funnels in OpenRevenue to see how visitors move through a sequence of steps and where they drop off.","icon":"funnel","href":"/advanced/funnels"},{"title":"Transactions","icon":"receipt","href":"/advanced/transactions"},{"title":"Revenue integrations","description":"Connect a payment provider like Polar, Shopify, or RevenueCat to attribute real revenue, orders, and conversion rate to your analytics.","icon":"circle-dollar-sign","href":"/advanced/revenue"},{"title":"Integrations","icon":"plug","href":"/advanced/integrations"},{"title":"Visitors","icon":"users","href":"/advanced/visitors"},{"title":"Cookies and consent","icon":"cookie","href":"/advanced/cookies-and-consent"},{"title":"Public stats","icon":"share-2","href":"/advanced/public-stats"},{"title":"Widgets","icon":"layout-dashboard","href":"/advanced/widgets"},{"title":"Installation security","icon":"shield-check","href":"/advanced/security"},{"title":"Uploaded files","icon":"upload","href":"/advanced/uploads"},{"title":"Web Vitals","sidebarTitle":"Web vitals","icon":"gauge","href":"/advanced/web-vitals"},{"title":"Bot traffic tracking","sidebarTitle":"Bot tracking","icon":"bot","href":"/advanced/bot-tracking"},{"title":"First-party proxy","icon":"route","href":"/advanced/first-party-proxy"}]}]},{"tab":"API reference","icon":"square-terminal","pages":[{"title":"API reference","href":"/api/account-api"}]}]},"basePath":"","title":"Transactions - OpenRevenue Documentation","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":[],"chunks":[]}