from dub import Dub
with Dub(
token="DUB_API_KEY",
) as d_client:
res = d_client.track.lead(request={
"click_id": "<id>",
"event_name": "Sign up",
})
assert res is not None
# Handle response
print(res)
{
"click": {
"id": "<string>"
},
"customer": {
"name": "<string>",
"email": "<string>",
"avatar": "<string>",
"externalId": "<string>"
}
}
Track a lead for a short link.
from dub import Dub
with Dub(
token="DUB_API_KEY",
) as d_client:
res = d_client.track.lead(request={
"click_id": "<id>",
"event_name": "Sign up",
})
assert res is not None
# Handle response
print(res)
{
"click": {
"id": "<string>"
},
"customer": {
"name": "<string>",
"email": "<string>",
"avatar": "<string>",
"externalId": "<string>"
}
}
Default authentication mechanism
A lead was tracked.
The response is of type object
.