{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"redocly_category":"Documentation","type":"markdown"},"seo":{"title":"Define lead source data","description":"Learn how to define lead source data when creating a payment token in Rebilly using the FramePay library.","siteUrl":"https://www.rebilly.com","image":"/assets/rebillysocial.94fb32fc280c9e84b963c440ec462771d25f4e6fdaaa6c59de41e8135113b46b.db81178d.png","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"define-lead-source-data","__idx":0},"children":["Define lead source data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This topic describes how to define lead source data when creating a payment token in Rebilly using the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/dev-docs/framepay"},"children":["FramePay JavaScript library"]},"."," ","For more information about lead source attribution, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/dev-docs/lead-source-attribution"},"children":["Lead source attribution"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["By default, the FramePay library automatically collects lead source data from URL parameters (such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["utm_source"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["utm_medium"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["utm_campaign"]},")."," ","You can override this behavior by defining lead source data in the configuration."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To view availble parameters, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://www.rebilly.com/docs/dev-docs/api/payment-tokens/posttoken#payment-tokens/posttoken/t=request&path=&d=0/leadsource"},"children":["leadSource"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"JavaScript","header":{"controls":{"copy":{}}},"source":"Framepay.initialize({\n    publishableKey: 'pk_sandbox_123456',\n    organizationId: 'my-organization-id',\n    websiteId: 'my-website-id',\n    leadSource: {\n        affiliate: 'partner-abc-123',\n        subAffiliate: 'blog-post-456',\n        source: 'partner-network'\n    }\n});\n","lang":"JavaScript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"deactivate-lead-source-attribution","__idx":1},"children":["Deactivate lead source attribution"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To deactivate lead source attribution in FramePay, provide an empty ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["object"]}," to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["leadSource"]}," configuration option."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To deactivate lead source attribution in Rebilly Instruments, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/dev-docs/reference-rebilly-instruments#features-configuration-properties"},"children":["Features configuration properties"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"JavaScript","header":{"controls":{"copy":{}}},"source":"Framepay.initialize({\n    publishableKey: 'pk_sandbox_123456',\n    organizationId: 'my-organization-id',\n    websiteId: 'my-website-id',\n    leadSource: {} // Disables automatic UTM collection\n});\n","lang":"JavaScript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," Lead source configuration can also be overridden for a specific token by passing it to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createToken"]}," method:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"JavaScript","header":{"controls":{"copy":{}}},"source":"Framepay.createToken(form, {\n    leadSource: {\n        source: 'special-campaign'\n    }\n});\n","lang":"JavaScript"},"children":[]}]},"headings":[{"value":"Define lead source data","id":"define-lead-source-data","depth":1},{"value":"Deactivate lead source attribution","id":"deactivate-lead-source-attribution","depth":2}],"frontmatter":{"seo":{"title":"Define lead source data","description":"Learn how to define lead source data when creating a payment token in Rebilly using the FramePay library.","lang":"en-US"},"redirects":null,"excludeFromSearch":true},"lastModified":"2026-01-12T11:16:51.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/dev-docs/define-lead-source-data","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}