(track)
Track a lead for a short link.
from dub import Dub
s = Dub(
token="DUB_API_KEY",
)
res = s.track.lead(request={
"click_id": "<value>",
"event_name": "Sign up",
"customer_id": "<value>",
})
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.TrackLeadRequestBody | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.TrackLeadResponseBody
Error Type | Status Code | Content Type |
---|---|---|
errors.BadRequest | 400 | application/json |
errors.Unauthorized | 401 | application/json |
errors.Forbidden | 403 | application/json |
errors.NotFound | 404 | application/json |
errors.Conflict | 409 | application/json |
errors.InviteExpired | 410 | application/json |
errors.UnprocessableEntity | 422 | application/json |
errors.RateLimitExceeded | 429 | application/json |
errors.InternalServerError | 500 | application/json |
errors.SDKError | 4XX, 5XX | */* |
Track a sale for a short link.
from dub import Dub
from dub.models import operations
s = Dub(
token="DUB_API_KEY",
)
res = s.track.sale(request={
"customer_id": "<value>",
"amount": 996500,
"payment_processor": operations.PaymentProcessor.SHOPIFY,
"event_name": "Purchase",
})
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.TrackSaleRequestBody | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.TrackSaleResponseBody
Error Type | Status Code | Content Type |
---|---|---|
errors.BadRequest | 400 | application/json |
errors.Unauthorized | 401 | application/json |
errors.Forbidden | 403 | application/json |
errors.NotFound | 404 | application/json |
errors.Conflict | 409 | application/json |
errors.InviteExpired | 410 | application/json |
errors.UnprocessableEntity | 422 | application/json |
errors.RateLimitExceeded | 429 | application/json |
errors.InternalServerError | 500 | application/json |
errors.SDKError | 4XX, 5XX | */* |
Track a customer for an authenticated workspace.
from dub import Dub
s = Dub(
token="DUB_API_KEY",
)
res = s.track.customer()
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.TrackCustomerRequestBody | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.TrackCustomerResponseBody
Error Type | Status Code | Content Type |
---|---|---|
errors.BadRequest | 400 | application/json |
errors.Unauthorized | 401 | application/json |
errors.Forbidden | 403 | application/json |
errors.NotFound | 404 | application/json |
errors.Conflict | 409 | application/json |
errors.InviteExpired | 410 | application/json |
errors.UnprocessableEntity | 422 | application/json |
errors.RateLimitExceeded | 429 | application/json |
errors.InternalServerError | 500 | application/json |
errors.SDKError | 4XX, 5XX | */* |