Here we have collected example connector configurations that you can use as a reference, or take and modify for your own usage.
Awin
Description | A connector to fetch Transaction data for advertiser accounts from Awin. |
API used | Awin v1 API Get Accounts endpoint to fetch a list of Advertiser accounts Get List of Transactions -endpoint to fetch transaction data |
Authentication method | API key |
Account fetcher | Yes.
|
Report types | Has one report type to fetch transactions:
|
Open to view example configuration for Awin
{
"$schema": "https://api.supermetrics.com/cc/v1/schema/connector",
"authentication": {
"type": "user_input",
"description": "Please insert your Awin API token and give a name for your login. \n\n <a href=\"https://support.supermetrics.com/support/solutions/articles/19000131434-awin-authentication-and-reauthentication-guide\" target=\"_blank\">Need help connecting?</a>",
"userInputs": [
{
"id": "api_key",
"label": "API token",
"type": "password"
},
{
"id": "account_name",
"label": "Give a name for your login",
"type": "text"
}
]
},
"dataSourceUser": {
"userInfo": {
"id": {
"source": "static",
"value": "{{ identity() }}"
},
"label": {
"source": "userInput",
"value": "account_name"
},
"accessToken": {
"source": "userInput",
"value": "api_key"
}
}
},
"accounts": {
"fetchers": [
{
"request": {
"url": "https://api.awin.com/accounts",
"parameters": [
{
"name": "type",
"value": "advertiser"
}
],
"headers": [
{
"name": "Authorization",
"value": "Bearer {{user.access_token}}"
}
],
"response": {
"dataRows": {
"source": "jsonPath",
"value": "$.accounts.*"
}
}
},
"accountInfo": {
"id": {
"source": "jsonPath",
"value": "$.accountId"
},
"label": {
"source": "jsonPath",
"value": "$.accountName"
},
"group": {
"source": "static",
"value": "Advertisers"
},
"properties": [
{
"id": "accountType",
"source": "jsonPath",
"value": "$.accountType"
},
{
"id": "userRole",
"source": "jsonPath",
"value": "$.userRole"
}
]
}
}
],
"filter": [
{
"value": {
"source": "jsonPath",
"value": "$.userRole"
},
"not": {
"equals": "userServicedUser"
}
}
]
},
"reporting": {
"reportTypes": [
{
"id": "trans",
"title": "Transactions report",
"config": {
"showDefaultDateFields": true,
"readDateFrom": "transaction_date_time",
"splitRequestsToMonths": true
},
"request": {
"headers": [
{
"name": "Authorization",
"value": "Bearer {{user.access_token}}"
}
],
"url": "https://api.awin.com/advertisers/{{account.id}}/transactions/",
"parameters": [
{
"name": "startDate",
"value": "{{query.startDate.atom}}"
},
{
"name": "endDate",
"value": "{{query.endDate.atom}}"
}
],
"response": {
"dataRows": {
"source": "jsonPath",
"value": "$.*"
}
}
},
"dimensions": {
"groups": [
{
"label": "Transaction",
"fields": [
{
"id": "campaign",
"label": "Campaign name",
"description": "Name of the campaign",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.campaign"
}
},
{
"id": "transaction_id",
"label": "Transaction ID",
"description": "ID of the transaction",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.id"
}
},
{
"id": "transaction_query_id",
"label": "Transaction query ID",
"description": "The unique ID of the transaction query",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.transactionQueryId"
}
},
{
"id": "type",
"label": "Transaction type",
"description": "The type of the transaction",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.type"
}
},
{
"id": "transaction_url",
"label": "Transaction URL",
"description": "URL of the transaction",
"dataType": "string.text.url",
"value": {
"source": "jsonPath",
"value": "$.url"
}
},
{
"id": "transaction_date",
"label": "Transaction date",
"description": "The date and time of the click",
"dataType": "string.time.date",
"subfields": [
"transaction_date_time"
],
"dimensionValueFormat": {
"operation": "convert_date",
"parameters": [
"",
"Y-m-d"
]
}
},
{
"id": "transaction_date_time",
"label": "Transaction date and time",
"description": "The date and time of the transaction",
"dataType": "string.time.datetime",
"value": {
"source": "jsonPath",
"value": "$.transactionDate"
}
},
{
"id": "decline_reason",
"label": "Transaction decline reason",
"description": "The decline reason of the transaction",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.declineReason"
}
},
{
"id": "transaction_device",
"label": "Transaction device",
"description": "Device where transaction happened",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.transactionDevice"
}
},
{
"id": "voucher_code_used",
"label": "Voucher code used",
"description": "Whether voucher code was used or not for transaction",
"dataType": "bool",
"value": {
"source": "jsonPath",
"value": "$.voucherCodeUsed"
}
},
{
"id": "voucher_code",
"label": "Voucher code",
"description": "The voucher code that was used for the transaction",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.voucherCode"
}
},
{
"id": "amended",
"label": "Amended",
"description": "Whether transaction has been amended or not",
"dataType": "bool",
"value": {
"source": "jsonPath",
"value": "$.amended"
}
},
{
"id": "amend_reason",
"label": "Amend reason",
"description": "Reason why transaction was amended",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.amendReason"
}
},
{
"id": "commission_group_code",
"label": "Commission group code",
"description": "Commission group code of the transaction parts",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.transactionParts[*].commissionGroupCode"
},
"isVisible": false
},
{
"id": "transaction_parts",
"label": "Transaction parts",
"description": "Transaction parts",
"dataType": "string.text.value",
"subfields": [
"commission_group_code",
"transaction_parts_amount"
],
"calculation": [
{
"operation": "concat",
"parameters": [
":"
]
}
]
},
{
"id": "custom_parameters",
"label": "Custom parameters",
"description": "List of custom parameters and values",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.customParameters"
}
}
]
},
{
"label": "Advertiser",
"fields": [
{
"id": "advertiser_id",
"label": "Advertiser ID",
"description": "ID of the advertiser",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.advertiserId"
}
},
{
"id": "advertiser_country",
"label": "Advertiser country",
"description": "The country of the advertiser",
"dataType": "string.geo.country.twolettercode",
"value": {
"source": "jsonPath",
"value": "$.advertiserCountry"
}
}
]
},
{
"label": "Publisher",
"fields": [
{
"id": "publisher_id",
"label": "Publisher ID",
"description": "ID of the publisher",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.publisherId"
}
},
{
"id": "site_name",
"label": "Site name",
"description": "Name of the site",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.siteName"
}
},
{
"id": "publisher_url",
"label": "Publisher URL",
"description": "The URL of the publisher",
"dataType": "string.text.url",
"value": {
"source": "jsonPath",
"value": "$.publisherUrl"
}
},
{
"id": "commission_sharing_publisher_id",
"label": "Commission sharing publisher ID",
"description": "ID of the commission sharing publisher",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.commissionSharingPublisherId"
}
},
{
"id": "commission_sharing_selected_rate_publisher_id",
"label": "Commission sharing selected rate publisher ID",
"description": "ID of the commission sharing selected rate publisher",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.commissionSharingSelectedRatePublisherId"
}
}
]
},
{
"label": "Customer",
"fields": [
{
"id": "customer_country",
"label": "Customer country",
"description": "Country of the customer",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.customerCountry"
}
},
{
"id": "ip_hash",
"label": "IP hash",
"description": "Hash of the IP address",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.ipHash"
}
}
]
},
{
"label": "Click",
"fields": [
{
"id": "click_ref",
"label": "Click reference",
"description": "Click reference for transaction",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.clickRefs.clickRef"
}
},
{
"id": "click_date",
"label": "Click date",
"description": "The date of the click",
"dataType": "string.time.date",
"subfields": [
"click_date_time"
],
"dimensionValueFormat": {
"operation": "convert_date",
"parameters": [
"",
"Y-m-d"
]
}
},
{
"id": "click_date_time",
"label": "Click date and time",
"description": "The date and time of the click",
"dataType": "string.time.datetime",
"value": {
"source": "jsonPath",
"value": "$.clickDate"
}
},
{
"id": "click_device",
"label": "Click device",
"description": "Device where click happened",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.clickDevice"
}
}
]
},
{
"label": "Commission",
"fields": [
{
"id": "order_ref",
"label": "Order reference",
"description": "The reference of the order",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.orderRef"
}
},
{
"id": "sale_currency",
"label": "Sale currency",
"description": "Currency of the sale",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.saleAmount.currency"
}
},
{
"id": "commission_currency",
"label": "Commission currency",
"description": "Currency of the commission",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.commissionAmount.currency"
}
},
{
"id": "commission_status",
"label": "Commission status",
"description": "Status of the commission",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.commissionStatus"
}
},
{
"id": "paid_to_publisher",
"label": "Paid to publisher",
"description": "Whether transaction commission has been paid to publisher or not",
"dataType": "bool",
"value": {
"source": "jsonPath",
"value": "$.paidToPublisher"
}
},
{
"id": "payment_id",
"label": "Payment ID",
"description": "The unique ID of the payment",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.paymentId"
}
}
]
}
]
},
"metrics": {
"groups": [
{
"label": "Transaction",
"fields": [
{
"id": "commission_amount",
"label": "Commission amount",
"description": "The amount of commission",
"dataType": "float.currency.value",
"value": {
"source": "jsonPath",
"value": "$.commissionAmount.amount"
}
},
{
"id": "sale_amount",
"label": "Sale amount",
"description": "The amount of sale",
"dataType": "float.currency.value",
"value": {
"source": "jsonPath",
"value": "$.saleAmount.amount"
}
},
{
"id": "old_sale_amount",
"label": "Old sale amount",
"dataType": "float.currency.value",
"value": {
"source": "jsonPath",
"value": "$.oldSaleAmount.amount"
}
},
{
"id": "old_commission_amount",
"label": "Old commission amount",
"dataType": "float.currency.value",
"value": {
"source": "jsonPath",
"value": "$.oldCommissionAmount.amount"
}
},
{
"id": "original_sale_amount",
"label": "Original sale amount",
"description": "The original sale amount",
"dataType": "float.currency.value",
"value": {
"source": "jsonPath",
"value": "$.originalSaleAmount"
}
},
{
"id": "lapse_time",
"label": "Lapse time",
"description": "The conversion time in seconds",
"dataType": "int.number.value",
"value": {
"source": "jsonPath",
"value": "$.lapseTime"
}
},
{
"id": "network_fee",
"label": "Network fee",
"description": "Network fee of the transactions",
"dataType": "float.currency.value",
"value": {
"source": "jsonPath",
"value": "$.networkFee.amount"
}
},
{
"id": "transaction_parts_amount",
"label": "Transaction parts amount",
"description": "Amount of the transaction parts",
"dataType": "float.currency.value",
"value": {
"source": "jsonPath",
"value": "$.transactionParts[*].amount"
},
"isVisible": false
}
]
}
]
}
}
]
},
"defaultResponseHandler": {
"responseStatuses": [
{
"httpStatus": 200,
"action": "success"
},
{
"httpStatus": 400,
"action": "error",
"message": "Error",
"messageDetails": {
"source": "jsonPath",
"value": "$.description"
}
},
{
"httpStatus": 401,
"action": "error",
"message": "Error",
"messageDetails": {
"source": "jsonPath",
"value": "$.description"
}
},
{
"httpStatus": 429,
"action": "retry",
"messageDetails": {
"source": "static",
"value": "API rate limit exceeded. If this problem appears again, please reach out to Awin to increase your API rate limits. Read more here: https://support.supermetrics.com/support/solutions/articles/19000137094-about-api-rate-limits-in-awin"
}
}
],
"conditionalStatuses": [
{
"conditions": [
{
"value": {
"source": "jsonPath",
"value": "$.error"
},
"is": {
"contains": "access_denied"
}
},
{
"value": {
"source": "jsonPath",
"value": "$.description"
},
"is": {
"contains": "Access is denied"
}
},
{
"value": {
"source": "responseStatus",
"value": ""
},
"is": {
"equals": "403"
}
}
],
"type": "and",
"action": "exclude_invalid_account_data"
},
{
"conditions": [
{
"value": {
"source": "responseStatus",
"value": ""
},
"is": {
"equals": "403"
}
}
],
"action": "error",
"message": "Forbidden",
"messageDetails": {
"source": "static",
"value": "“Access is denied. Please make sure you are using a valid API key related to an advertiser account. Publisher or any other type of accounts are not currently supported."
}
}
],
"retry": {
"maxRetries": 20,
"minWait": 2,
"maxWait": 60,
"delayType": "exp"
}
}
}HubSpot (form submissions)
Description | A connector to fetch Form submissions from HubSpot API. |
API used | HubSpot API:
|
Authentication method | OAuth2
|
Account fetcher | Yes.
|
Report types | Has one report type allowing user to select a form, and fetch a list of submissions for the selected form:
|
Open to view example configuration for HubSpot
{
"authentication": {
"type": "oauth2",
"oauth2": {
"clientId": "[your own Client ID]",
"clientSecret": "[your own Client Secret]",
"tokenLifetime": 3600,
"tokenJsonPath": "$.access_token",
"authorization": {
"request": {
"url": "https://app.hubspot.com/oauth/authorize",
"parameters": [
{
"name": "client_id",
"value": "{{oauth2.client_id}}"
},
{
"name": "scope",
"value": "crm.objects.companies.read crm.objects.contacts.read crm.objects.custom.read crm.objects.deals.read crm.schemas.companies.read crm.schemas.contacts.read crm.schemas.custom.read crm.schemas.deals.read forms oauth"
},
{
"name": "redirect_uri",
"value": "https://supermetrics.com/login-complete"
}
]
}
},
"tokenExchange": {
"request": {
"method": "POST",
"url": "https://api.hubapi.com/oauth/v1/token",
"body": {
"type": "urlencoded_form",
"formData": [
{
"name": "grant_type",
"value": "authorization_code"
},
{
"name": "code",
"value": "{{oauth2.code}}"
},
{
"name": "client_id",
"value": "{{oauth2.client_id}}"
},
{
"name": "client_secret",
"value": "{{oauth2.client_secret}}"
},
{
"name": "redirect_uri",
"value": "https://supermetrics.com/login-complete"
}
]
}
}
},
"refresh": {
"request": {
"method": "POST",
"url": "https://api.hubapi.com/oauth/v1/token",
"body": {
"type": "urlencoded_form",
"formData": [
{
"name": "grant_type",
"value": "refresh_token"
},
{
"name": "refresh_token",
"value": "{{oauth2.refresh_token}}"
},
{
"name": "client_id",
"value": "{{oauth2.client_id}}"
},
{
"name": "client_secret",
"value": "{{oauth2.client_secret}}"
}
]
}
}
}
}
},
"dataSourceUser": {
"request": {
"type": "sync",
"method": "GET",
"url": "https://api.hubapi.com/oauth/v1/access-tokens/{{user.access_token}}",
"response": {
"type": "JSON",
"dataRows": {
"source": "jsonPath",
"value": "$"
},
"useDefaultResponseHandler": false,
"responseHandler": {
"conditionalStatuses": [
{
"conditions": [
{
"value": {
"source": "responseBody",
"value": ""
},
"is": {
"contains": "The access token is expired or invalid"
}
}
],
"action": "renew_token"
}
],
"responseStatuses": [
{
"httpStatus": 401,
"action": "renew_token"
}
]
}
}
},
"userInfo": {
"id": {
"source": "jsonPath",
"value": "$.user_id"
},
"label": {
"source": "jsonPath",
"value": "$.user"
}
}
},
"accounts": {
"hasAccounts": true,
"fetchers": [
{
"request": {
"type": "sync",
"method": "GET",
"url": "https://api.hubapi.com/account-info/v3/details",
"headers": [
{
"name": "Authorization",
"value": "Bearer {{user.access_token}}"
}
],
"response": {
"type": "JSON",
"dataRows": {
"source": "jsonPath",
"value": "$"
},
"useDefaultResponseHandler": true
}
},
"accountInfo": {
"id": {
"source": "jsonPath",
"value": "$.portalId"
},
"label": {
"source": "jsonPath",
"value": "$.uiDomain"
},
"properties": [
{
"id": "hub_id",
"source": "jsonPath",
"value": "$.portalId"
}
]
}
}
]
},
"reporting": {
"reportTypes": [
{
"id": "form_submissions",
"title": "Form Submissions",
"config": {
"isVisible": true,
"showDefaultDateFields": false,
"resultFiltering": {
"dateRange": {
"enabled": true,
"filteringValue": {
"source": "jsonPath",
"value": "$.submittedAt"
}
}
}
},
"settings": {
"items": [
{
"id": "form_filter",
"type": "select",
"label": "Form",
"dynamicOptions": [
{
"request": {
"type": "sync",
"method": "GET",
"url": "https://api.hubapi.com/marketing/v3/forms",
"headers": [
{
"name": "Authorization",
"value": "Bearer {{user.access_token}}"
}
],
"response": {
"type": "JSON",
"dataRows": {
"source": "jsonPath",
"value": "$.results[*]"
},
"pagination": {
"type": "cursor",
"nextPageParameterName": "after",
"maxResultsPerPage": 20,
"nextPagePath": {
"source": "jsonPath",
"value": "$.paging.next.after"
}
}
}
},
"optionInfo": {
"label": {
"source": "jsonPath",
"value": "$.name"
},
"value": {
"source": "jsonPath",
"value": "$.id"
}
}
}
]
}
]
},
"request": {
"type": "sync",
"method": "GET",
"url": "https://api.hubapi.com/form-integrations/v1/submissions/forms/{{query.settings.form_filter}}",
"headers": [
{
"name": "Authorization",
"value": "Bearer {{user.access_token}}"
}
],
"parameters": [
{
"name": "limit",
"value": "50"
}
],
"response": {
"type": "JSON",
"dataRows": {
"source": "jsonPath",
"value": "$.results.*"
},
"dataAdapters": {
"items": [
{
"type": "flatten_values",
"config": {
"dataPath": "$.results.*",
"valuesPath": "$.values.*"
}
}
]
},
"pagination": {
"type": "cursor",
"nextPageParameterName": "after",
"maxResultsPerPage": 50,
"nextPagePath": {
"source": "jsonPath",
"value": "$.paging.next.after"
}
}
}
},
"dimensions": {
"groups": [
{
"label": "Time",
"fields": [
{
"id": "timestamp_converted",
"label": "Timestamp converted",
"description": ".",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.submittedAt"
},
"valueFormatFormula": "div$1000&&round$",
"isVisible": false
},
{
"id": "submission_date",
"label": "Submission date",
"description": "The date when the form was submitted.",
"dataType": "string.time.datetime",
"isDate": true,
"timeGranularity": "day",
"subfields": [
"timestamp_converted"
],
"dimensionValueFormat": {
"operation": "convert_date",
"parameters": [
"U",
"Y-m-d H:i:s"
]
},
"isVisible": false
},
{
"id": "date",
"label": "Date",
"dataType": "string.time.date",
"timeGranularity": "day",
"isDate": true,
"subfields": [
"timestamp_converted"
],
"dimensionValueFormat": {
"operation": "convert_date",
"parameters": [
"U",
"Y-m-d"
]
}
}
]
},
{
"label": "Submission Details",
"fields": [
{
"id": "conversion_id",
"label": "Conversion ID",
"description": "Unique identifier for the form submission.",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.conversionId"
}
},
{
"id": "page_url",
"label": "Page URL",
"description": "The URL where the form was submitted.",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.pageUrl"
}
}
]
},
{
"label": "Form Field Data",
"fields": [
{
"id": "form_field_name",
"label": "Form field name",
"description": "The name of the form field.",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.values_name"
}
},
{
"id": "form_field_value",
"label": "Form field value",
"description": "The submitted value for the form field.",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.values_value"
}
},
{
"id": "form_field_object_type_id",
"label": "Form field object type ID",
"description": "The object type ID associated with the form field.",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.values_objectTypeId"
}
}
]
}
]
}
}
]
},
"defaultResponseHandler": {
"responseStatuses": [
{
"httpStatus": 200,
"action": "success"
},
{
"httpStatus": 400,
"action": "error",
"messageDetails": {
"source": "jsonPath",
"value": "$.message"
}
},
{
"httpStatus": 401,
"action": "renew_token"
},
{
"httpStatus": 429,
"action": "retry",
"message": "Too many requests. Please try again later and select fewer metrics or a shorter time range in your query. Learn more at https://support.supermetrics.com/support/solutions/articles/19000154701"
},
{
"httpStatus": 500,
"action": "error",
"message": "Bad request",
"messageDetails": {
"source": "jsonPath",
"value": "$.message"
}
}
],
"retry": {
"maxRetries": 3,
"minWait": 30,
"maxWait": 60,
"delayType": "add2"
}
}
}Public product feed
Description | The most simple form of a connector having only “reporting” component in use to fetch data from a publicly available endpoint. |
API used | A public DummyJSON testing API Get all products endpoint to fetch a list of products and their stock availability |
Authentication method | None. Publicly available endpoint. |
Account fetcher | No |
Report types | Has one report type to fetch a list of products:
|
Open to view example public product feed configuration
{
"reporting": {
"reportTypes": [
{
"id": "product_feed",
"title": "Product feed",
"request": {
"method": "GET",
"url": "https://dummyjson.com/products?limit=0",
"response": {
"type": "JSON",
"dataRows": {
"source": "jsonPath",
"value": "$.products.*"
}
}
},
"config": {
"showDateRange": false
},
"dimensions": {
"groups": [
{
"label": "Product info",
"fields": [
{
"id": "id",
"dataType": "int.number.value",
"label": "ID",
"value": {
"source": "jsonPath",
"value": "$.id"
}
},
{
"id": "title",
"dataType": "string.text.value",
"label": "Title",
"value": {
"source": "jsonPath",
"value": "$.title"
}
},
{
"id": "description",
"dataType": "string.text.value",
"label": "Description",
"value": {
"source": "jsonPath",
"value": "$.description"
}
},
{
"id": "category",
"dataType": "string.text.value",
"label": "Category",
"value": {
"source": "jsonPath",
"value": "$.category"
}
},
{
"id": "price",
"dataType": "float.currency.value",
"label": "Price",
"value": {
"source": "jsonPath",
"value": "$.price"
}
},
{
"id": "discount_percentage",
"dataType": "float.number.percentage",
"label": "Discount Percentage",
"value": {
"source": "jsonPath",
"value": "$.discountPercentage"
}
},
{
"id": "brand",
"dataType": "string.text.value",
"label": "Brand",
"value": {
"source": "jsonPath",
"value": "$.brand"
}
},
{
"id": "sku",
"dataType": "string.text.value",
"label": "SKU",
"value": {
"source": "jsonPath",
"value": "$.sku"
}
},
{
"id": "weight",
"dataType": "float.number.value",
"label": "Weight",
"value": {
"source": "jsonPath",
"value": "$.weight"
}
},
{
"id": "width",
"dataType": "float.number.value",
"label": "Width",
"value": {
"source": "jsonPath",
"value": "$.dimensions.width"
}
},
{
"id": "height",
"dataType": "float.number.value",
"label": "Height",
"value": {
"source": "jsonPath",
"value": "$.dimensions.height"
}
},
{
"id": "depth",
"dataType": "float.number.value",
"label": "Depth",
"value": {
"source": "jsonPath",
"value": "$.dimensions.depth"
}
},
{
"id": "warranty_information",
"dataType": "string.text.value",
"label": "Warranty Information",
"value": {
"source": "jsonPath",
"value": "$.warrantyInformation"
}
},
{
"id": "shipping_information",
"dataType": "string.text.value",
"label": "Shipping Information",
"value": {
"source": "jsonPath",
"value": "$.shippingInformation"
}
},
{
"id": "availability_status",
"dataType": "string.text.value",
"label": "Availability Status",
"value": {
"source": "jsonPath",
"value": "$.availabilityStatus"
}
},
{
"id": "return_policy",
"dataType": "string.text.value",
"label": "Return Policy",
"value": {
"source": "jsonPath",
"value": "$.returnPolicy"
}
},
{
"id": "minimum_order_quantity",
"dataType": "int.number.value",
"label": "Minimum Order Quantity",
"value": {
"source": "jsonPath",
"value": "$.minimumOrderQuantity"
}
},
{
"id": "created_at",
"dataType": "string.time.date",
"label": "Created At",
"value": {
"source": "jsonPath",
"value": "$.meta.createdAt"
}
},
{
"id": "updated_at",
"dataType": "string.time.date",
"label": "Updated At",
"value": {
"source": "jsonPath",
"value": "$.meta.updatedAt"
}
},
{
"id": "barcode",
"dataType": "string.text.value",
"label": "Barcode",
"value": {
"source": "jsonPath",
"value": "$.meta.barcode"
}
},
{
"id": "qr_code",
"dataType": "string.text.value",
"label": "QR Code",
"value": {
"source": "jsonPath",
"value": "$.meta.qrCode"
}
},
{
"id": "thumbnail",
"dataType": "string.text.url",
"label": "Thumbnail",
"value": {
"source": "jsonPath",
"value": "$.thumbnail"
}
}
]
}
]
},
"metrics": {
"groups": [
{
"label": "Inventory",
"fields": [
{
"id": "stock",
"dataType": "int.number.value",
"label": "stock",
"value": {
"source": "jsonPath",
"value": "$.stock"
},
"aggregationType": "sum"
}
]
},
{
"label": "Ratings",
"fields": [
{
"id": "rating",
"dataType": "float.number.value",
"label": "Rating",
"value": {
"source": "jsonPath",
"value": "$.rating"
},
"aggregationType": "avg"
}
]
}
]
}
}
]
}
}Teads
Description | A connector to fetch ad campaign performance data from Teads using asynchronous data fetching flow. |
API used | |
Authentication method | API key |
Account fetcher | No |
Report types | Has one report type to fetch a performance report from the API:
|
Open to view example configuration for Teads
{
"authentication": {
"description": "Please insert your API token and give a name for your login. The API token can be generated behind Settings - API Keys on the Teads Ad Manager UI.\n\n <a href=\"https://support.supermetrics.com/support/solutions/articles/19000151699-teads-connection-guide/\" target=\"_blank\">Need help connecting?</a>",
"type": "user_input",
"userInputs": [
{
"id": "api_key",
"label": "API key",
"type": "password"
},
{
"id": "account_name",
"label": "Give a name for your login",
"type": "text"
}
]
},
"dataSourceUser": {
"userInfo": {
"id": {
"source": "static",
"value": "{{ identity() }}"
},
"label": {
"source": "userInput",
"value": "account_name"
},
"accessToken": {
"source": "userInput",
"value": "api_key"
}
}
},
"accounts": {
"hasAccounts": false
},
"reporting": {
"reportTypes": [
{
"id": "reporting",
"title": "Reporting",
"config": {
"readDateFrom": "day",
"showDefaultDateFields": true,
"showDateRange": true,
"maxDaysPerRequest": 85,
"splitRequestsToMonths": false
},
"settings": {
"items": [
{
"id": "utc_offset",
"label": "Timezone",
"type": "select",
"options": [
{
"label": "(GMT-07:00) - America/Los_Angeles",
"value": "America/Los_Angeles"
},
{
"label": "(GMT-04:00) - America/New_York",
"value": "America/New_York"
},
{
"label": "(GMT+00:00) - UTC",
"value": "Etc/GMT+0",
"isDefault": true
},
{
"label": "(GMT+02:00) - Europe/Berlin",
"value": "Europe/Berlin"
},
{
"label": "(GMT+08:00) - Asia/Singapore",
"value": "Asia/Singapore"
},
{
"label": "(GMT+10:00) - Australia/Sydney",
"value": "Australia/Sydney"
}
]
}
]
},
"request": {
"type": "async",
"async": {
"init": {
"method": "POST",
"url": "https://ads.teads.tv/api/reports/run",
"headers": [
{
"name": "Authorization",
"value": "{{user.access_token}}"
}
],
"body": {
"type": "json",
"content": {
"filters": {
"date": {
"start": "{{date('Y-m-d\\TH:i:s',query.start_date.atom)}}",
"end": "{{date('Y-m-d\\TH:i:s',query.end_date.atom)}}",
"timezone": "{{query.settings.utc_offset}}"
}
},
"dimensions": {
"ccContentTemplate": "query.fields.asStringArray",
"arguments": {
"from": "query.dimensions.array"
}
},
"metrics": {
"ccContentTemplate": "query.fields.asStringArray",
"arguments": {
"from": "query.metrics.array"
}
}
}
},
"response": {
"data": [
{
"id": "report_id",
"source": "jsonPath",
"value": "$.id"
}
]
}
},
"poll": {
"method": "GET",
"url": "https://ads.teads.tv/api/reports/status/{{async.init.data.report_id}}",
"headers": [
{
"name": "Authorization",
"value": "{{user.access_token}}"
},
{
"name": "User-Agent",
"value": "Supermetrics"
}
],
"response": {
"type": "JSON",
"data": [
{
"id": "status",
"source": "jsonPath",
"value": "$.status"
},
{
"id": "uri",
"source": "jsonPath",
"value": "$.uri"
}
]
}
}
},
"method": "GET",
"url": "{{async.poll.data.uri}}",
"response": {
"type": "CSV",
"csvConfig": {
"delimiter": ","
}
}
},
"dimensions": {
"groups": [
{
"label": "Time",
"fields": [
{
"id": "day",
"label": "Date",
"description": "The date of the data",
"dataType": "string.time.datetime",
"value": {
"source": "jsonPath",
"value": "$.Day"
},
"isVisible": false
}
]
},
{
"label": "Account",
"fields": [
{
"id": "advertiser_id",
"label": "Advertiser ID",
"description": "Teads id of the advertiser.",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.['Advertiser ID']"
}
},
{
"id": "advertiser_name",
"label": "Advertiser name",
"description": "Name of the advertiser.",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.['Advertiser name']"
}
}
]
},
{
"label": "Campaign",
"fields": [
{
"id": "ad_id",
"label": "Campaign ID",
"description": "Teads id of the campaign.",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.['Campaign ID']"
}
}
]
},
{
"label": "Visitor",
"fields": [
{
"id": "country_code",
"label": "Country code",
"description": "Country code of the user - ISO 3166-1 alpha-2 format.",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.['Country code']"
}
},
{
"id": "country_name",
"label": "Country name",
"description": "Country name of the user.",
"dataType": "string.text.value",
"value": {
"source": "jsonPath",
"value": "$.['Country name']"
}
}
]
}
]
},
"metrics": {
"groups": [
{
"label": "Key metrics",
"fields": [
{
"id": "click",
"label": "Clicks",
"description": "Number of creative clicks.",
"dataType": "int.number.value",
"value": {
"source": "jsonPath",
"value": "$.Clicks"
}
},
{
"id": "impression",
"label": "Impression",
"description": "Number of impressions.",
"dataType": "int.number.value",
"isIncludedAutomatically": true,
"value": {
"source": "jsonPath",
"value": "$.Impressions"
},
"isDataStudioDefault": true
},
{
"id": "ctr",
"label": "CTR",
"description": "Click-through rate.",
"dataType": "float.number.ratio",
"subfields": [
"click",
"impression"
],
"calculation": [
{
"operation": "divide"
}
]
},
{
"id": "post_click_conversion",
"label": "Post Click conversions",
"description": "Number of post click conversions attributed to the campaign.",
"dataType": "int.number.value",
"value": {
"source": "jsonPath",
"value": "$.['Post click conversions']"
}
},
{
"id": "post_view_conversion",
"label": "Post View conversions",
"description": "Number of post view conversions attributed to the campaign.",
"dataType": "int.number.value",
"value": {
"source": "jsonPath",
"value": "$.['Post view conversions']"
}
},
{
"id": "uv_impression",
"label": "Unique Viewers",
"description": "Estimated number of unique Teads IDs exposed to the ad.",
"dataType": "int.number.value",
"value": {
"source": "jsonPath",
"value": "$.['Unique viewers']"
}
}
]
},
{
"label": "Cost / spend",
"fields": [
{
"id": "turnover_value",
"label": "Budget Spent",
"description": "Budget spent (i.e. invoiced by Teads). Includes Ad Manager fee. Does not include Added Value budget nor Agency fee. It is calculated as Fee + Total ad cost",
"dataType": "float.currency.value",
"value": {
"source": "jsonPath",
"value": "$.['Budget spent']"
}
},
{
"id": "turnover_advertising_value",
"label": "Total ad cost",
"description": "Budget spent on advertising cost. Does not include Added Value Budget, nor Ad Manager fee, nor Agency fee.",
"dataType": "float.currency.value",
"value": {
"source": "jsonPath",
"value": "$.['Total ad cost']"
}
},
{
"id": "turnover_fee_value",
"label": "Fee",
"description": "Budget spent on Ad Manager fee cost.",
"dataType": "float.currency.value",
"value": {
"source": "jsonPath",
"value": "$.Fee"
}
}
]
}
]
}
}
]
}
}