Skip to content

Latest commit

 

History

History
157 lines (107 loc) · 4.94 KB

TrackApi.md

File metadata and controls

157 lines (107 loc) · 4.94 KB

dub.api.TrackApi

Load the API package

import 'package:dub/api.dart';

All URIs are relative to https://api.dub.co

Method HTTP request Description
trackCustomer POST /track/customer Track a customer
trackLead POST /track/lead Track a lead
trackSale POST /track/sale Track a sale

trackCustomer

TrackCustomer200Response trackCustomer(workspaceId, projectSlug, trackCustomerRequest)

Track a customer

Track a customer for an authenticated workspace.

Example

import 'package:dub/api.dart';

final api = Dub().getTrackApi();
final String workspaceId = ws_cluuwcv0r...; // String | The ID of the workspace.
final String projectSlug = projectSlug_example; // String | The slug of the project. This field is deprecated – use `workspaceId` instead.
final TrackCustomerRequest trackCustomerRequest = ; // TrackCustomerRequest | 

try {
    final response = api.trackCustomer(workspaceId, projectSlug, trackCustomerRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling TrackApi->trackCustomer: $e\n');
}

Parameters

Name Type Description Notes
workspaceId String The ID of the workspace.
projectSlug String The slug of the project. This field is deprecated – use workspaceId instead. [optional]
trackCustomerRequest TrackCustomerRequest [optional]

Return type

TrackCustomer200Response

Authorization

token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

trackLead

TrackLead200Response trackLead(workspaceId, projectSlug, trackLeadRequest)

Track a lead

Track a lead for a short link.

Example

import 'package:dub/api.dart';

final api = Dub().getTrackApi();
final String workspaceId = ws_cluuwcv0r...; // String | The ID of the workspace.
final String projectSlug = projectSlug_example; // String | The slug of the project. This field is deprecated – use `workspaceId` instead.
final TrackLeadRequest trackLeadRequest = ; // TrackLeadRequest | 

try {
    final response = api.trackLead(workspaceId, projectSlug, trackLeadRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling TrackApi->trackLead: $e\n');
}

Parameters

Name Type Description Notes
workspaceId String The ID of the workspace.
projectSlug String The slug of the project. This field is deprecated – use workspaceId instead. [optional]
trackLeadRequest TrackLeadRequest [optional]

Return type

TrackLead200Response

Authorization

token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

trackSale

TrackSale200Response trackSale(workspaceId, projectSlug, trackSaleRequest)

Track a sale

Track a sale for a short link.

Example

import 'package:dub/api.dart';

final api = Dub().getTrackApi();
final String workspaceId = ws_cluuwcv0r...; // String | The ID of the workspace.
final String projectSlug = projectSlug_example; // String | The slug of the project. This field is deprecated – use `workspaceId` instead.
final TrackSaleRequest trackSaleRequest = ; // TrackSaleRequest | 

try {
    final response = api.trackSale(workspaceId, projectSlug, trackSaleRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling TrackApi->trackSale: $e\n');
}

Parameters

Name Type Description Notes
workspaceId String The ID of the workspace.
projectSlug String The slug of the project. This field is deprecated – use workspaceId instead. [optional]
trackSaleRequest TrackSaleRequest [optional]

Return type

TrackSale200Response

Authorization

token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]