Last updated
These docs are intended for a developer audience.Dismiss

Define lead source data

This topic describes how to define lead source data when creating a payment token in Rebilly using the FramePay JavaScript library. For more information about lead source attribution, see Lead source attribution.

By default, the FramePay library automatically collects lead source data from URL parameters (such as utm_source, utm_medium, utm_campaign). You can override this behavior by defining lead source data in the configuration.

To view availble parameters, see leadSource.

Example:

Framepay.initialize({
    publishableKey: 'pk_sandbox_123456',
    organizationId: 'my-organization-id',
    websiteId: 'my-website-id',
    leadSource: {
        affiliate: 'partner-abc-123',
        subAffiliate: 'blog-post-456',
        source: 'partner-network'
    }
});

Deactivate lead source attribution

To deactivate lead source attribution in FramePay, provide an empty object to the leadSource configuration option.

To deactivate lead source attribution in Rebilly Instruments, see Features configuration properties.

Example:

Framepay.initialize({
    publishableKey: 'pk_sandbox_123456',
    organizationId: 'my-organization-id',
    websiteId: 'my-website-id',
    leadSource: {} // Disables automatic UTM collection
});

Note: Lead source configuration can also be overridden for a specific token by passing it to the createToken method:

Framepay.createToken(form, {
    leadSource: {
        source: 'special-campaign'
    }
});