Example Query
The query below includes every field currently available from the Calltracks API v2. You can use it as a starting point, but please remove any fields you do not need: requesting only the data you actually use keeps responses smaller and faster.
Lines starting with # are optional "ask by name" fields (tagType, dataLayer and cookie). To use one, remove the # and set the name to the value you want, otherwise simply delete the line. Full details of every field can be found in the API v2 documentation on your own Calltracks account (youraccount.calltracks.com/api/v2).
Please note: the tags section is returned as a list and its contents vary by account. Depending on your website's data layer and your Calltracks setup you may see a handful of entries or fifty, so treat it as a list of type and name pairs rather than expecting fixed items in fixed positions. Fields with no data for a given call are returned as null.
{
call(id: 3239313) {
callerName
callerNumber
destinationNumber
duration
id
landingNumber
recorded
recordingReady
ringDuration
sipHeaderCallId
cdrForeignKey
startTime
status
toName
viewCallTimeDiff
visitId
recordingUrl
barritelRecordingUrl
transcription
transcriptionText
transcriptionSummary
# tagType(name: "Answered By")
tags {
id
type
name
}
sale {
id
dateOfSale
timeOfSale
crmSaleFk
productIdentifier
productDescription
transactionType {
id
name
}
customer {
id
name
}
}
advert {
id
name
media {
id
name
titleId
title
}
# tagType(name: "GMB title")
tags {
id
type
name
}
campaign {
id
name
orgLevelName
orgLevel {
orgLevelId
name
orgLevelType {
orgLevelTypeId
name
}
}
}
}
customer {
id
name
customerIds
}
pageView {
url
analyticsCookieValues
createdAt
# stockId: dataLayer(name: "stock id")
visit {
id
gclid
landingPageUrl
visitorId
# cookie1: cookie(name: "CustomVisit1")
pageViews {
url
analyticsCookieValues
createdAt
}
tags {
trackingType
matchType
searchPhrase
keyword
keywordSource
analyticsTrafficSource
analyticsCampaignMedium
analyticsCampaignName
analyticsAdGroup
analyticsCampaignContent
analyticsMsclkid
analyticsGoogleVehicleAdId
referrerUrl
analyticsGclid
source
}
visitor {
ga4SessionId
gaGlobalVid
uaClientId
ctguid
analyticsFk
# cookie1: cookie(name: "CustomVisitor1")
}
}
}
}
}Example Payload
{
"data": {
"call": {
"callerName": null,
"callerNumber": "+44 74 99999999",
"destinationNumber": "+44 1242 99999",
"duration": "00:00:04",
"id": "3239313",
"landingNumber": "+44 1242 888888",
"recorded": false,
"recordingReady": false,
"ringDuration": "1 sec",
"sipHeaderCallId": null,
"cdrForeignKey": null,
"startTime": "2024-05-01T14:08:59Z",
"status": "Answered",
"toName": null,
"viewCallTimeDiff": "00:00:19",
"visitId": "47458946",
"recordingUrl": null,
"barritelRecordingUrl": null,
"transcription": null,
"transcriptionText": "Speaker (1): Hello. \nSpeaker (2): Hello.",
"transcriptionSummary": "A brief call exchanging greetings and then promptly ending.",
"tags": [
{ "id": "118049", "type": "Url Tagging", "name": "used_car_details" },
{ "id": "1180499", "type": "VA Category", "name": "sale" },
{ "id": "1180498", "type": "VA Sales Stage", "name": "First Time" },
{ "id": "1192921", "type": "VA Sales Type", "name": "Used" },
{ "id": "119293", "type": "dealership", "name": "Barbuck Cars" },
{ "id": "119296", "type": "fuelType", "name": "Petrol" },
{ "id": "119298", "type": "imagePlaceholder", "name": "False" },
{ "id": "119301", "type": "make", "name": "Jaguar" },
{ "id": "119307", "type": "stockType", "name": "Used" },
{ "id": "121720", "type": "transmission", "name": "Automatic" },
{ "id": "121803", "type": "engineSize", "name": "~" },
{ "id": "126192", "type": "mileage", "name": "9500" },
{ "id": "126940", "type": "regYear", "name": "2018" },
{ "id": "129663", "type": "price", "name": "15000" },
{ "id": "193553", "type": "colour", "name": "Black" },
{ "id": "193556", "type": "model", "name": "XE" },
{ "id": "193557", "type": "stockId", "name": "123" },
{ "id": "195205", "type": "version", "name": "R-Sport" }
],
"sale": null,
"advert": {
"id": "445449",
"name": "barbuckcars.co.uk visitor tracking Visitor Tracking (282326878)",
"media": {
"id": "122",
"name": "Online",
"titleId": "418",
"title": "Company Website"
},
"tags": null,
"campaign": {
"id": "224466",
"name": "barbuckcars.co.uk / Visitor / Barbuck Cars",
"orgLevelName": "Barbuck Cars",
"orgLevel": {
"orgLevelId": "5150",
"name": "Barbuck Cars",
"orgLevelType": {
"orgLevelTypeId": "3",
"name": "Dealership"
}
}
}
},
"customer": null,
"pageView": {
"url": "https://barbuckcars.co.uk/car/123/",
"analyticsCookieValues": null,
"createdAt": "2024-05-01T14:08:40Z",
"visit": {
"id": "47458946",
"gclid": null,
"landingPageUrl": "https://barbuckcars.co.uk/car",
"visitorId": "28321693",
"pageViews": [
{
"url": "https://barbuckcars.co.uk/car",
"analyticsCookieValues": null,
"createdAt": "2024-05-01T14:07:32Z"
},
{
"url": "https://barbuckcars.co.uk/car/123/",
"analyticsCookieValues": null,
"createdAt": "2024-05-01T14:08:36Z"
}
],
"tags": {
"trackingType": "Visitor",
"matchType": null,
"searchPhrase": null,
"keyword": null,
"keywordSource": null,
"analyticsTrafficSource": null,
"analyticsCampaignMedium": "organic",
"analyticsCampaignName": null,
"analyticsAdGroup": null,
"analyticsCampaignContent": null,
"analyticsMsclkid": null,
"analyticsGoogleVehicleAdId": null,
"referrerUrl": "https://www.google.com/",
"analyticsGclid": null,
"source": "None (Direct traffic)"
},
"visitor": {
"ga4SessionId": "1714572452",
"gaGlobalVid": "1798855214.1713455648",
"uaClientId": "1798855214.1713455648",
"ctguid": "4df7bab7cdc757ec6db752278359c99a",
"analyticsFk": null
}
}
}
}
}
}
Comments