First, add the main tracking scripts to your website.
Replace <your-account-id-here> with your actual account id found in the settings > integrations page on your FirstPromoter dashboard.
If you are using Stripe, Chargebee, Braintree, Paddle or Recurly we can track sales automatically on our end. You will only need to connect your billing provider to FirstPromoter.
If you use any other billing provider you will need to track sales using the tracking API. For more information on sales tracking API, see documentation here
When a sale event is received, FirstPromoter will automatically:
Identify the corresponding affiliate to assign the sale to.
Assign the corresponding reward/commission to the promoter.
With this in place you have completed the basic tracking flow. From tracking of clicks through to assigning the corresponding commissions to the affiliates.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"FirstPromoter Docs","colors":{"primary":"#2497F3","light":"#42A5F5","dark":"#1A1C25"},"logo":{"light":"https://mintcdn.com/firstpromoter/Qml53iAwCwPGiKRZ/logo/light.svg?fit=max\u0026auto=format\u0026n=Qml53iAwCwPGiKRZ\u0026q=85\u0026s=17d35344b27497f795682da8932295c9","dark":"https://mintcdn.com/firstpromoter/Qml53iAwCwPGiKRZ/logo/dark.svg?fit=max\u0026auto=format\u0026n=Qml53iAwCwPGiKRZ\u0026q=85\u0026s=ef23e747176d9a87b5ddf122595793f8"},"favicon":"https://mintcdn.com/firstpromoter/rNk-Jdvp2vdjAvd9/favicon.png?fit=max\u0026auto=format\u0026n=rNk-Jdvp2vdjAvd9\u0026q=85\u0026s=7faf17e323609b0fef661b9a9fe49ebc","navbar":{"links":[{"href":"mailto:support@firstpromoter.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://login.firstpromoter.com/"}},"footer":{"socials":{"x":"https://x.com/firstpromoter","linkedin":"https://www.linkedin.com/company/first-promoter"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"firstpromoter","hasAudioNarration":false,"actualSubdomain":"firstpromoter","customDomains":["docs.firstpromoter.com"],"gitSource":{"type":"github","owner":"firstpromoter","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad5d6664613fdc88740d8e9","collectionId":"8fbb5c1e-fc55-4dd1-8162-6bca9be88e0f","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad5d6664613fdc88740d8e9"},"entitlements":{},"buildId":"6ad5d6664613fdc88740d8e9","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Documentation","count":209},{"language":"default","tag":"API Reference","count":81},{"language":"default","tag":"Integration Options","count":39},{"language":"default","tag":"Promoters","count":25},{"language":"default","tag":"Platform","count":22},{"language":"default","tag":"Webhooks","count":9},{"language":"default","tag":"Reports","count":8},{"language":"default","tag":"Custom","count":8},{"language":"default","tag":"Payouts","count":7},{"language":"default","tag":"Commissions","count":7}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"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":"llms-txt-v2","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"guides/tracking-with-fprjs","slug":"/guides/tracking-with-fprjs","pageMetadata":{"title":"Tracking with fpr.js","description":"Track clicks and referrals using the fpr.js scripts","href":"/guides/tracking-with-fprjs"},"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: \"Track clicks and referrals using the fpr.js scripts\"\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`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`installation`,children:`Installation`}),`\n`,_jsxs(_components.p,{children:[`First, add the main tracking scripts to your website.\nReplace `,_jsx(_components.code,{children:`\u003cyour-account-id-here>`}),` with your `,_jsx(_components.strong,{children:`actual account id`}),` found in the settings > integrations page on your FirstPromoter dashboard.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`w`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`w`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fpr`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` w`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fpr`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`w`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fpr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`q`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` w`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fpr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`q`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` []; `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`w`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fpr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`q`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`arguments`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'set'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'unshift'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'push'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`](`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`arguments`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); }; })(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fpr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"init\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`cid:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\u003cyour-account-id-here>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fpr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"click\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` src`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://cdn.firstpromoter.com/fpr.js\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`tracking-flow`,children:`Tracking Flow`}),`\n`,_jsx(Heading,{level:`3`,id:`1-click-tracking`,children:`1. Click Tracking`}),`\n`,_jsx(_components.p,{children:`The main tracking script automatically tracks visitors that come through your affiliate links:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`When a visitor arrives on your website using a referral link the main tracking script will automatically track the click.`}),`\n`,_jsxs(_components.li,{children:[`The click sets 2 cookies in the browser - `,_jsx(_components.code,{children:`_fprom_ref`}),` and `,_jsx(_components.code,{children:`_fprom_tid`})]}),`\n`,_jsx(_components.li,{children:`These cookies are used for tracking in future without the need for a referral link.`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`2-referral-tracking`,children:`2. Referral Tracking`}),`\n`,_jsx(_components.p,{children:`When a visitor signs up or fills an opt-in form, convert them to a referral by using the signup function:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fpr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"referral\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`email:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'actual_user_email@email.com'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`uid:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '123456'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`You can send only the email or only the uid or both. You need to ensure that the actual visitor data is passed to the function.`})}),`\n`,_jsx(Heading,{level:`3`,id:`3-sales-tracking`,children:`3. Sales Tracking`}),`\n`,_jsxs(_components.p,{children:[`If you are using `,_jsx(_components.a,{href:`https://login.firstpromoter.com?redirect=%2Fintegration%2Fstripe`,children:`Stripe`}),`, `,_jsx(_components.a,{href:`https://login.firstpromoter.com?redirect=%2Fintegration%2Fchargebee`,children:`Chargebee`}),`, `,_jsx(_components.a,{href:`https://login.firstpromoter.com?redirect=%2Fintegration%2Fbraintree`,children:`Braintree`}),`, `,_jsx(_components.a,{href:`https://login.firstpromoter.com?redirect=%2Fintegration%2Fpaddle`,children:`Paddle`}),` or `,_jsx(_components.a,{href:`https://login.firstpromoter.com?redirect=%2Fintegration%2Frecurly`,children:`Recurly`}),` we can track sales automatically on our end. You will only need to connect your billing provider to FirstPromoter.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`If you use any other billing provider you will need to track sales using the tracking `,_jsx(_components.a,{href:`https://docs.firstpromoter.com/api-reference-v2/api-admin/tracking-api/sales`,children:`API`}),`. For more information on sales tracking API, see documentation `,_jsx(_components.a,{href:`/api-reference-v2/api-admin/tracking-api/sales`,children:`here`})]})}),`\n`,_jsx(_components.p,{children:`When a sale event is received, FirstPromoter will automatically:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Identify the corresponding affiliate to assign the sale to.`}),`\n`,_jsx(_components.li,{children:`Assign the corresponding reward/commission to the promoter.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`With this in place you have completed the basic tracking flow. From tracking of clicks through to assigning the corresponding commissions to the affiliates.`})]})}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":{"config":{},"pageMetadata":{"title":"Tracking with fpr.js","description":"Track clicks and referrals using the fpr.js scripts","href":"/guides/tracking-with-fprjs"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Installation","slug":"installation","depth":2,"children":[]},{"title":"Tracking Flow","slug":"tracking-flow","depth":2,"children":[{"title":"1. Click Tracking","slug":"1-click-tracking","depth":3,"children":[]},{"title":"2. Referral Tracking","slug":"2-referral-tracking","depth":3,"children":[]},{"title":"3. Sales Tracking","slug":"3-sales-tracking","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/firstpromoter/8ad42af542d542c7/downloadables/fpr-prox.js"],"subdomain":"firstpromoter","siteName":"FirstPromoter Docs","title":"Tracking with fpr.js - FirstPromoter Docs","navMaps":{"firstHrefInVersion":{"v2":{"href":"/guides/tracking-with-fprjs","matchLevel":0},"v1":{"href":"/guides/tracking-with-fprjs","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-02-25T09:22:58.550Z","originalFileLocation":"guides/tracking-with-fprjs.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=\"Track clicks and referrals using the fpr.js scripts\">\u003cmeta data-mint-head name=\"application-name\" content=\"FirstPromoter Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/firstpromoter/NHAuOTz7uXRLkEOr/_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/firstpromoter/NHAuOTz7uXRLkEOr/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/firstpromoter/NHAuOTz7uXRLkEOr/_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/firstpromoter/NHAuOTz7uXRLkEOr/_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/firstpromoter/NHAuOTz7uXRLkEOr/_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/firstpromoter/NHAuOTz7uXRLkEOr/_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/firstpromoter/NHAuOTz7uXRLkEOr/_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/firstpromoter/NHAuOTz7uXRLkEOr/_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/firstpromoter/NHAuOTz7uXRLkEOr/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Tracking with fpr.js - FirstPromoter Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Track clicks and referrals using the fpr.js scripts\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"FirstPromoter Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.firstpromoter.com/guides/tracking-with-fprjs\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://firstpromoter.mintlify.app/_mintlify/api/og/v2?division=How+to+guides\u0026amp;title=Tracking+with+fpr.js\u0026amp;description=Track+clicks+and+referrals+using+the+fpr.js+scripts\u0026amp;theme=6c5c6938239eba73fb25a5bd\u0026amp;signature=1ebf936b81cff333a7f7ecfea15ba17256501826fe752cc7613994409436e1e9\">\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=\"Tracking with fpr.js - FirstPromoter Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Track clicks and referrals using the fpr.js scripts\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://firstpromoter.mintlify.app/_mintlify/api/og/v2?division=How+to+guides\u0026amp;title=Tracking+with+fpr.js\u0026amp;description=Track+clicks+and+referrals+using+the+fpr.js+scripts\u0026amp;theme=6c5c6938239eba73fb25a5bd\u0026amp;signature=1ebf936b81cff333a7f7ecfea15ba17256501826fe752cc7613994409436e1e9\">\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/firstpromoter/NHAuOTz7uXRLkEOr/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"FirstPromoter Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2497F3\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.firstpromoter.com/guides/tracking-with-fprjs\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/tracking-with-fprjs.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.firstpromoter.com/#organization\",\"name\":\"FirstPromoter Docs\",\"url\":\"https://docs.firstpromoter.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/firstpromoter/Qml53iAwCwPGiKRZ/logo/light.svg?fit=max\u0026auto=format\u0026n=Qml53iAwCwPGiKRZ\u0026q=85\u0026s=17d35344b27497f795682da8932295c9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.firstpromoter.com#website\",\"name\":\"FirstPromoter Docs\",\"url\":\"https://docs.firstpromoter.com\",\"publisher\":{\"@id\":\"https://docs.firstpromoter.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.firstpromoter.com/guides/tracking-with-fprjs#webpage\",\"url\":\"https://docs.firstpromoter.com/guides/tracking-with-fprjs\",\"name\":\"Tracking with fpr.js\",\"description\":\"Track clicks and referrals using the fpr.js scripts\",\"dateModified\":\"2026-02-25T09:22:58.550Z\",\"isPartOf\":{\"@id\":\"https://docs.firstpromoter.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.firstpromoter.com/guides/tracking-with-fprjs#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.firstpromoter.com/guides/tracking-with-fprjs#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"How to guides\",\"item\":\"https://docs.firstpromoter.com/guides/integrate-your-website\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tracking with fpr.js\",\"item\":\"https://docs.firstpromoter.com/guides/tracking-with-fprjs\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.firstpromoter.com/guides/tracking-with-fprjs#article\",\"headline\":\"Tracking with fpr.js\",\"name\":\"Tracking with fpr.js\",\"description\":\"Track clicks and referrals using the fpr.js scripts\",\"url\":\"https://docs.firstpromoter.com/guides/tracking-with-fprjs\",\"mainEntityOfPage\":{\"@id\":\"https://docs.firstpromoter.com/guides/tracking-with-fprjs#webpage\"},\"dateModified\":\"2026-02-25T09:22:58.550Z\",\"publisher\":{\"@id\":\"https://docs.firstpromoter.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.firstpromoter.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"FirstPromoter Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"FirstPromoter Docs","nav":{"global":null,"versions":[{"version":"v2","anchors":[{"anchor":"Documentation","icon":"book-open","tabs":[{"tab":"Documentation","groups":[{"group":"Overview","pages":[{"title":"Introduction","href":"/introduction"},{"title":"How FirstPromoter works","href":"/how-it-works"},{"title":"Quickstart","href":"/quickstart"}]},{"group":"How to guides","pages":[{"title":"Integrate Your Website","description":"Connect your website to FirstPromoter so clicks, sign-ups, and sales are tracked and attributed to the right affiliate.","href":"/guides/integrate-your-website"},{"title":"Tracking with fpr.js","href":"/guides/tracking-with-fprjs"},{"title":"Tracking without fpr.js","description":"Track affiliate leads and sales/payments using API calls","href":"/guides/tracking-without-fprjs"},{"title":"Proxy Setup (Optional)","href":"/guides/proxy-setup"},{"title":"Deep Linking for Mobile Apps (Flutter, iOS, Android, React Native)","href":"/guides/mobile-deep-linking"},{"title":"Mobile Attribution Providers (Branch.io, AppsFlyer, Adjust)","href":"/guides/mobile-attribution-providers"}]},{"group":"Advanced","pages":[{"title":"Embed the Dashboard \u0026 Auto-Login Promoters","href":"/advanced/embed-dashboard-login"},{"title":"Log Promoters Out of the Embedded Dashboard","href":"/advanced/embed-dashboard-logout"}]},{"group":"Scripts","pages":[{"title":"FirstPromoter JavaScript Library (fpr.js)","href":"/script-docs/fpr-js-docs"},{"title":"Advanced use cases \u0026 examples","href":"/script-docs/advanced"},{"title":"Concepts \u0026 Key Terminologies","href":"/script-docs/concepts"}]},{"group":"Integration Options","pages":[{"group":"Billing Provider","pages":[{"title":"Stripe","href":"/integrations/billing/stripe"},{"title":"Chargebee","href":"/integrations/billing/chargebee"},{"title":"Recurly","href":"/integrations/billing/recurly"},{"title":"Paddle","href":"/integrations/billing/paddle"},{"title":"Braintree","href":"/integrations/billing/braintree"},{"title":"API","href":"/integrations/billing/api"}]},{"group":"Platform","pages":[{"title":"WordPress","href":"/integrations/tracking/platform/wordpress"},{"title":"Highlevel","href":"/integrations/tracking/platform/highlevel"},{"title":"ClickFunnels","href":"/integrations/tracking/platform/clickfunnels"},{"group":"Stripe","pages":[{"title":"Payment Links","href":"/integrations/tracking/platform/stripe/payment-links"},{"title":"Pricing Table","href":"/integrations/tracking/platform/stripe/pricing-table"}]},{"title":"Ghost","href":"/integrations/tracking/platform/ghost"},{"title":"Kajabi","href":"/integrations/tracking/platform/kajabi"},{"title":"ThriveCart","href":"/integrations/tracking/platform/thrivecart"},{"title":"Samcart","href":"/integrations/tracking/platform/samcart"},{"title":"Kartra","href":"/integrations/tracking/platform/kartra"},{"title":"DropFunnels","href":"/integrations/tracking/platform/dropfunnels"},{"title":"Calendly","href":"/integrations/tracking/platform/calendly"},{"title":"Demio","href":"/integrations/tracking/platform/demio"},{"title":"Kickpages","href":"/integrations/tracking/platform/kickpages"},{"title":"Thinkific","href":"/integrations/tracking/platform/thinkific"},{"title":"HubSpot","href":"/integrations/tracking/platform/hubspot"},{"title":"Jotform","href":"/integrations/tracking/platform/jotform"},{"title":"Typeform","href":"/integrations/tracking/platform/typeform"},{"title":"WebinarJam","href":"/integrations/tracking/platform/webinarjam"},{"title":"Recurly Hosted Pages","href":"/integrations/tracking/platform/recurly-hosted-pages"},{"group":"Chargebee","pages":[{"title":"Drop-in Scripts","href":"/integrations/tracking/platform/chargebee/drop-in-scripts"},{"title":"Hosted Pages","href":"/integrations/tracking/platform/chargebee/hosted-pages"}]}]},{"group":"Custom","pages":[{"title":"JavaScript Tracking","href":"/integrations/tracking/custom/js"},{"title":"API Integration","href":"/integrations/tracking/custom/api"},{"title":"Django","href":"/integrations/tracking/custom/django"},{"title":"PHP","href":"/integrations/tracking/custom/php"},{"title":"Ruby on Rails","href":"/integrations/tracking/custom/rails"},{"title":"Stripe Checkout","href":"/integrations/tracking/custom/stripe-checkout"},{"title":"Paddle Checkout","href":"/integrations/tracking/custom/paddle-checkout"},{"title":"Google Tag Manager","href":"/integrations/tracking/custom/gtm"}]},{"group":"Automation","pages":[{"title":"n8n node","href":"/automation/n8n-node"},{"title":"Zapier","href":"/automation/zapier"},{"title":"Make.com","href":"/automation/make"}]}]},{"group":"Webhooks","pages":[{"title":"Webhooks v2 Overview","href":"/webhooks-v2/overview"},{"title":"Event Types","href":"/webhooks-v2/event-types"},{"title":"Payload Structure","href":"/webhooks-v2/payload"},{"title":"Delivery Tracking \u0026 Retries","href":"/webhooks-v2/deliveries"},{"title":"Non-Monetary Rewards","href":"/webhooks-v2/non-monetary-rewards"}]},{"group":"MCP Server (Experimental)","pages":[{"title":"MCP Server","href":"/mcp/overview"},{"title":"Available Tools","href":"/mcp/tools"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference-v2/api-admin/introduction"}]},{"tab":"Affiliate API Reference","hidden":true,"pages":[{"title":"Affiliate API Reference","href":"/api-reference-v2/api-affiliate/introduction"}]},{"tab":"Advanced API Reference","hidden":true,"pages":[{"title":"Advanced API Reference","href":"/api-reference-v2/api-advanced/introduction"}]}]},{"anchor":"API Reference","icon":"webhook","href":"https://docs.firstpromoter.com/api-reference-v2/api-admin/introduction"},{"anchor":"Help Center","icon":"square-question","href":"https://help.firstpromoter.com/en/"}]},{"version":"v1","anchors":[{"anchor":"Documentation","icon":"book-open","tabs":[{"tab":"Documentation","groups":[{"group":"Overview","pages":[{"title":"Introduction","href":"/introduction"},{"title":"How FirstPromoter works","href":"/how-it-works"},{"title":"Quickstart","href":"/quickstart"}]},{"group":"How to Guides","pages":[{"title":"Integrate Your Website","description":"Connect your website to FirstPromoter so clicks, sign-ups, and sales are tracked and attributed to the right affiliate.","href":"/guides/integrate-your-website"},{"title":"Tracking with fpr.js","href":"/guides/tracking-with-fprjs"},{"title":"Tracking without fpr.js","description":"Track affiliate leads and sales/payments using API calls","href":"/guides/tracking-without-fprjs"},{"title":"Proxy Setup (Optional)","href":"/guides/proxy-setup"},{"title":"Deep Linking for Mobile Apps (Flutter, iOS, Android, React Native)","href":"/guides/mobile-deep-linking"},{"title":"Mobile Attribution Providers (Branch.io, AppsFlyer, Adjust)","href":"/guides/mobile-attribution-providers"}]},{"group":"Advanced","pages":[{"title":"Embed the Dashboard \u0026 Auto-Login Promoters","href":"/advanced/embed-dashboard-login"},{"title":"Log Promoters Out of the Embedded Dashboard","href":"/advanced/embed-dashboard-logout"}]},{"group":"Scripts","pages":[{"title":"FirstPromoter JavaScript Library (fpr.js)","href":"/script-docs/fpr-js-docs"},{"title":"Advanced use cases \u0026 examples","href":"/script-docs/advanced"},{"title":"Concepts \u0026 Key Terminologies","href":"/script-docs/concepts"}]},{"group":"Integration Options","pages":[{"group":"Billing Provider","pages":[{"title":"Stripe","href":"/integrations/billing/stripe"},{"title":"Chargebee","href":"/integrations/billing/chargebee"},{"title":"Recurly","href":"/integrations/billing/recurly"},{"title":"Paddle","href":"/integrations/billing/paddle"},{"title":"Braintree","href":"/integrations/billing/braintree"},{"title":"API","href":"/integrations/billing/api"}]},{"group":"Platform","pages":[{"title":"WordPress","href":"/integrations/tracking/platform/wordpress"},{"title":"Highlevel","href":"/integrations/tracking/platform/highlevel"},{"title":"ClickFunnels","href":"/integrations/tracking/platform/clickfunnels"},{"group":"Stripe","pages":[{"title":"Payment Links","href":"/integrations/tracking/platform/stripe/payment-links"},{"title":"Pricing Table","href":"/integrations/tracking/platform/stripe/pricing-table"}]},{"title":"Ghost","href":"/integrations/tracking/platform/ghost"},{"title":"Kajabi","href":"/integrations/tracking/platform/kajabi"},{"title":"ThriveCart","href":"/integrations/tracking/platform/thrivecart"},{"title":"Samcart","href":"/integrations/tracking/platform/samcart"},{"title":"Kartra","href":"/integrations/tracking/platform/kartra"},{"title":"DropFunnels","href":"/integrations/tracking/platform/dropfunnels"},{"title":"Calendly","href":"/integrations/tracking/platform/calendly"},{"title":"Demio","href":"/integrations/tracking/platform/demio"},{"title":"Kickpages","href":"/integrations/tracking/platform/kickpages"},{"title":"Thinkific","href":"/integrations/tracking/platform/thinkific"},{"title":"HubSpot","href":"/integrations/tracking/platform/hubspot"},{"title":"Jotform","href":"/integrations/tracking/platform/jotform"},{"title":"Typeform","href":"/integrations/tracking/platform/typeform"},{"title":"WebinarJam","href":"/integrations/tracking/platform/webinarjam"},{"title":"Recurly Hosted Pages","href":"/integrations/tracking/platform/recurly-hosted-pages"},{"group":"Chargebee","pages":[{"title":"Drop-in Scripts","href":"/integrations/tracking/platform/chargebee/drop-in-scripts"},{"title":"Hosted Pages","href":"/integrations/tracking/platform/chargebee/hosted-pages"}]}]},{"group":"Custom","pages":[{"title":"JavaScript Tracking","href":"/integrations/tracking/custom/js"},{"title":"API Integration","href":"/integrations/tracking/custom/api"},{"title":"Django","href":"/integrations/tracking/custom/django"},{"title":"PHP","href":"/integrations/tracking/custom/php"},{"title":"Ruby on Rails","href":"/integrations/tracking/custom/rails"},{"title":"Stripe Checkout","href":"/integrations/tracking/custom/stripe-checkout"},{"title":"Paddle Checkout","href":"/integrations/tracking/custom/paddle-checkout"},{"title":"Google Tag Manager","href":"/integrations/tracking/custom/gtm"}]}]},{"group":"Webhooks","pages":[{"title":"Overview","href":"/webhooks/overview"},{"title":"Event Types","href":"/webhooks/event-types"},{"title":"Payload Structure","href":"/webhooks/payload"},{"title":"Delivery \u0026 Retries","href":"/webhooks/deliveries"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference-v1/introduction"}]}]},{"anchor":"API Reference","icon":"webhook","href":"https://docs.firstpromoter.com/api-reference-v1/introduction"},{"anchor":"Help Center","icon":"square-question","href":"https://help.firstpromoter.com/en/"}]}]},"basePath":"","title":"Tracking with fpr.js - FirstPromoter Docs","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}