POST
/
track
/
lead
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",
        ExternalID: "<id>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res != nil {
        // handle response
    }
}
{
  "click": {
    "id": "<string>"
  },
  "customer": {
    "name": "<string>",
    "email": "<string>",
    "avatar": "<string>",
    "externalId": "<string>"
  }
}

Conversions endpoints require a Business plan subscription or higher.

Authorizations

Authorization
string
header
required

Default authentication mechanism

Body

application/json

Response

200
application/json

A lead was tracked.

The response is of type object.