(track)
Track a lead for a short link.
require 'dub'
s = ::OpenApiSDK::Dub.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
token: "DUB_API_KEY",
)
)
req = ::OpenApiSDK::Operations::TrackLeadRequestBody.new(
click_id: "<id>",
event_name: "Sign up",
)
res = s.track.lead(req)
if ! res.object.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
request |
::OpenApiSDK::Operations::TrackLeadRequestBody | ✔️ | The request object to use for the request. |
T.nilable(::OpenApiSDK::Operations::TrackLeadResponse)
Track a sale for a short link.
require 'dub'
s = ::OpenApiSDK::Dub.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
token: "DUB_API_KEY",
)
)
req = ::OpenApiSDK::Operations::TrackSaleRequestBody.new(
amount: 996500,
payment_processor: ::OpenApiSDK::Operations::PaymentProcessor::PADDLE,
event_name: "Purchase",
)
res = s.track.sale(req)
if ! res.object.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
request |
::OpenApiSDK::Operations::TrackSaleRequestBody | ✔️ | The request object to use for the request. |
T.nilable(::OpenApiSDK::Operations::TrackSaleResponse)
Track a customer for an authenticated workspace.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
require 'dub'
s = ::OpenApiSDK::Dub.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
token: "DUB_API_KEY",
)
)
req = ::OpenApiSDK::Operations::TrackCustomerRequestBody.new(
customer_id: "<id>",
)
res = s.track.customer(req)
if ! res.object.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
request |
::OpenApiSDK::Operations::TrackCustomerRequestBody | ✔️ | The request object to use for the request. |