Clicks

On this page:

THE CLICK OBJECT

A detailed description of the JSON object

GET[base]/clicks

Get a clicks list

GET[base]/clicks/{clickId}

Get click details

POST[base]/clicks

Add a new click

PUT[base]/clicks/{clickId}

Update a click

DELETE[base]/clicks/{clickId}

Delete a click


The Click object

This object provides the following data about a click:

clickId string

The click identifier.

time string

The date and time when a click has been registered.

referrer string

The request source URL.

ip string

The IP address from which the click has been registered.

uri string

The uniform resource identifier of a campaign.

userAgent string

The information about the user agent originating the request. A string consists of one or more product identifiers, each followed by zero or more comments.

utmCampaign string

The URI parameter that specifies an individual campaign name.

utmContent string

The URI parameter that’s used to differentiate similar content, or links within the same ad. For example, if you have two call-to-action links within the same email message, you can use utmContent and set different values for each so you can tell which version is more effective.

utmMedium string

The URI parameter that specifies advertising or marketing media, for example: cpc, banner, email.

utmSource string

The URI parameter that identifies an advertiser, site, publication, that’s sending traffic to your property, for example: google, youtube.

utmTerm string

The URI parameter that identifies paid search keywords.

profileId string

The profile identifier of a client who registered by the link. If empty, this click counts as a page view.

linkId string

The identifier of a link.

bannerId string

The banner identifier.

bannerName string

The banner name.

cdnFileUrl string

The URL of a banner CDN image.

latitude integer

Geographical latitude of the place from which the click has been registered. It’s defined based on an IP address.

longitude integer

Geographical longitude of the place from which the click has been registered. It’s defined based on an IP address.

countryCode string

Two-letter code of a country (as per ISO 3166) from where the click has been registered. It’s defined based on an IP address.

countryName string

The name of a country (as per ISO 3166) from where the click has been registered. It’s defined based on an IP address.

createTime string

The date and time when the object has been created.

updateTime string

The date and time when the object has been last updated.

uuid string

The universally unique identifier of the object (if provided). Refer to Integrations for more information.

THE CLICK OBJECT
{
  "clickId": "6006dda272f002519c3eb505",
  "time": "2021-01-01T00:00:00+00:00",
  "referrer": "https://twitter.com",
  "ip": "185.155.96.184",
  "uri": "https://my.stage.org/register?referral=1&utm_campaign=sport&utm_content=UEFA&utm_medium=banner&utm_source=youtube.com&utm_term=bitcoin",
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15",
  "utmCampaign": "sport",
  "utmContent": "UEFA",
  "utmMedium": "banner",
  "utmSource": "youtube.com",
  "utmTerm": "bitcoin",
  "profileId": "6006dda272f002519c3eb505",
  "linkId": "6006dda272f002519c3eb505",
  "bannerId": "6006dda272f002519c3eb505",
  "bannerName": "Tight Spreads",
  "bannerCdnFileUrl": "https://s3.eu-west-2.amazonaws.com/stage.org/en/200x200/Tight+Spreads.png",
  "latitude": "37.751",
  "longitude": "-97.822",
  "countryCode": "US",
  "countryName": "United States",
  "createTime": "2021-01-01T00:00:00+00:00",
  "updateTime": "2021-01-01T00:00:00+00:00",
  "uuid": null
}

Get a clicks list

Use this method to obtain a list of all clicks on all links registered in the system.

To obtain detailed information about a specified click, use a separate method to get click details.

Request

Header parameters:

  • Authorization: Bearer <token>

Query parameters:

This method supports pagination, sorting, filtering, and query. For details on applying the parameters, refer to the Query parameters section. Possible parameters for filtering, sorting, and query are listed below. For values description, refer to the Click object.

Possible values for the filter parameter:

  • bannerIdFilter

  • clickStartTime

  • clickEndTime

  • countryCode

  • countryName

  • ip

  • linkId

  • latitude

  • longitude

  • registration — set to 1 to filter clicks that lead to registrations

  • profileName — the partner name as specified in the partner’s profile (refer to the Profile object)

  • profileContacts — the client contact details as specified in the client’s profile (refer to the Profile object)

  • profileCountryName — the client country name as specified in the client’s profile (refer to the Profile object)

  • referrer

  • tag — the client tag as specified in the client’s profile (refer to the Profile object)

  • uri

  • userAgent

  • utmCampaign

  • utmContent

  • utmMedium

  • utmSource

  • utmTerm

  • uuid

Possible values for the sort_by parameter:

  • clickId

  • createTime

  • ip

  • latitude

  • longitude

  • referrer

  • tag — the client tag as specified in the client’s profile (refer to the Profile object)

  • time

  • uri

  • userAgent

  • utmCampaign

  • utmContent

  • utmMedium

  • utmSource

  • utmTerm

  • updateTime

Possible values for the query parameter:

  • contacts — client contact details

  • link — link information

  • metrics — link metrics information

  • profile — client profile information

GET[base]/clicks

curl --location -g --request GET 'https://your.base-url.here/clicks?limit=10&offset=0&sort_by=createTime&sort_order=desc&filter[bannerId]=6006dda272f002519c3eb505&filter[clickStartTime]=2021-01-01T00:00:00+00:00&filter[clickEndTime]=2021-01-31T23:59:59+00:00&filter[countryCode]=US&filter[countryName]=United States&filter[ip]=185.155.96.184&filter[linkId]=6006dda272f002519c3eb505&filter[latitude]=37.751&filter[longitude]=-97.822&filter[registration]=1&filter[profileName]=Mary Jane Smith&filter[profileContacts]=a31b1402@privaterelay.appleid.com&filter[profileCountryName]=United States&filter[referrer]=https://twitter.com&filter[tag]=61&filter[uri]=https://my.my.stage.org/register?referral=1&filter[userAgent]=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15&filter[utmCampaign]=sport&filter[utmContent]=UEFA&filter[utmContent]=banner&filter[utmContent]=youtube.com&filter[utmContent]=bitcoin&filter[uuid]=9&query[link]=1&query[profile]=1&query[metrics]=1&query[contacts]=1' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, a response body contains an array of Click objects providing information about all clicks that correspond to the query parameters specified in the request.

Additionally, the response body may contain the following information if any of these were specified in the query parameters of the request:


Get click details

Use this method to obtain detailed information about a specified click.

To obtain a list of all clicks on all links registered in the system, use a separate method to get a list of clicks.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

clickId required

The click identifier.

Query parameters:

This method supports query. For details on applying the parameters, refer to the Query parameters section.

Possible values for the query parameter:

  • contacts — client contact details

  • link — link information

  • metrics — link metrics information

  • profile — client profile information

GET[base]/clicks/{clickId}

curl --location -g --request GET 'https://your.base-url.here/clicks/60ba407d15951453e60e49f8?query[link]=1&query[profile]=1&query[metrics]=1&query[contacts]=1' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains a Click object providing information about the specified click.

Additionally, the response body may contain the following information if any of these were specified in the query parameters of the request:


Add a new click

Use this method to add a new click upon a page view or registration event.

Request

Header parameters:

  • Authorization: Bearer <token>

  • Content-Type: application/json

Body:

ip string required

The IP address from which the click has been registered.

uri string required

The uniform resource identifier of a campaign.

locale string

The locale of a user interface.

referrer string

The request source URL.

time string

The date and time of a click.

userAgent string

The information about the user agent originating the request. A string consists of one or more product identifiers, each followed by zero or more comments.

uuid string

The universally unique identifier of the click. Refer to Integrations for more information.

POST[base]/clicks

curl --location -g --request POST 'https://your.base-url.here/clicks' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "ip": "185.155.96.184",
  "uri": "https://my.stage.org/register?referral=1",
  "locale": null,
  "referrer": "https://twitter.com",
  "time": "2021-01-01T00:00:00+00:00",
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15",
  "uuid": null
}'

Response

Body:

In case of success, the response body contains a Click object providing information about the newly created click.


Update a click

Use this method to update information about a click after a client registration.

If a user followed the link and became a client, the information about this specified click is supplemented with client profile data.

Note

Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.

Request

Header parameters:

  • Authorization: Bearer <token>

  • Content-Type: application/json

Path parameters:

clickId required

The click identifier.

Body:

Values of the following fields can be updated:

firstName string required

The client first name specified during registration.

The string value length can’t exceed 255 characters.

lastName string required

The client last name specified during registration.

The string value length can’t exceed 255 characters.

middleName string required

The client middle name specified during registration.

The string value length can’t exceed 255 characters.

enabled boolean required

If true, a profile is enabled.

uuid string required

The universally unique identifier of the object (if provided). Refer to Integrations for more information.

The string value length can’t exceed 255 characters.

contacts object required

The client contact data.

Expand fields
key string required

The name of a contact type. Possible values:

  • email

  • phone

The string value length can’t exceed 255 characters.

value string required

The value of a contact type: an email address or a phone number.

The string value length can’t exceed 255 characters.

uuid string

The universally unique identifier of the object. Refer to Integrations for more information.

The string value length can’t exceed 255 characters.

PUT[base]/clicks/{clickId}

curl --location -g --request PUT 'https://your.base-url.here/clicks/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "profile": {
    "firstName": "Mary",
    "lastName": "Smith",
    "middleName": "Jane",
    "enabled": true,
    "uuid": null,
    "contacts": [
      {
        "key": "email",
        "value": "client@email.com",
        "uuid": null
      },
      {
        "key": "phone",
        "value": "+9876543210",
        "uuid": null
      }
    ]
  }
}'

Response

Body:

In case of success, the response body contains a Click object providing information about the updated click.


Delete a click

Use this method to delete a specified click.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

clickId required

The click identifier.

DELETE[base]/clicks/{clickId}

curl --location --request DELETE 'https://your.base-url.here/clicks/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, no response body is returned.