Track a lead for a short link.
Go
package main import( "context" dubgo "github.com/dubinc/dub-go" "github.com/dubinc/dub-go/models/operations" "log" ) func main() { ctx := context.Background() s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) res, err := s.Track.Lead(ctx, &operations.TrackLeadRequestBody{ ClickID: "<id>", EventName: "Sign up", CustomerExternalID: "<id>", }) if err != nil { log.Fatal(err) } if res != nil { // handle response } }
{ "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.
object
Was this page helpful?