Sign Up Now For A Free Trial

Twilio Tracker API

Track your Twilio usage in Google Analytics! Send your data REST style with an HTTP POST or take the easy route and send it via an HTTP GET.

An article at Twilio explains the benefits of tracking your calls but it doesn't tell you how. Our Twilio Tracker API makes it easy to feed your call information directly into Google Analytics. Now you can take advantage of the years of research and experience that have gone into the most widely used analytics package on the web!

If you're using OpenVBX you can use our TwolBox Tracker plugin and be up and running in no time!

Cost: 1 token per request ($0.000667 - $0.001)

Request

URL: http://api.twolbox.com/2011-1-1/twilio-tracker

Please note that parameters are case sensitive.

Parameter NameDescription 
authIdYour TwolBox Auth ID.Required
authTokenYour TwolBox Auth Token.Required
gaidGoogle Analytics Profile ID (UA-XXXXXXXX-X)Required
zipZip code that the call or SMS came from or went to.Required
hostnameName of the server that is handling the Twilio request.Required
pathPath portion of the URL that is handling the Twilio requestRequired
visitorIdA unique identifier for each visitor. CallSid or SmsSid number works great!Required
titleTitle for the URL requested. Maps to page title in Google Analytics.Optional
referrerHTTP Header "Referer".Optional
userAgentHTTP Header "User-Agent".Optional
cityCity that the call or SMS came from or went to.Optional
stateState that the call or SMS came from or went to.Optional
countryCountry that the call or SMS came from or went to.Optional
c.nameCampaign name. We like to use our phone number that placed or received the call.Required
c.sourceCampaign source. "Twilio" works for us but you can use whatever you want.Required
c.mediumCampaign medium. We use "Phone" or "SMS" but you can use whatever you want.Required

Response

The response is sent in JSON format.

NameValue
status"OK" or "ERROR".
statusCodeInteger response code for easier automated processing.
  • 200: OK
  • 400: Validation Error
  • 401: Unauthorized (invalid credentials)
  • 402: Payment Required
errorsAn array of error messages or an empty array if there were no errors.

You can quickly and easily integrate our API into your Twilio handler. Just fill in a few fields and we'll cook up a custom recipe for you to drop in!

 

Request

Parameter NameValueDescription
Your TwolBox Auth ID.
Your TwolBox Auth Token.
Google Analytics Profile ID (UA-XXXXXXXX-X)
Zip code that the call or SMS came from or went to.
Name of the server that is handling the Twilio request.
Path portion of the URL that is handling the Twilio request
A unique identifier for each visitor. CallSid or SmsSid number works great!
Title for the URL requested. Maps to page title in Google Analytics.
HTTP Header "Referer".
HTTP Header "User-Agent".
City that the call or SMS came from or went to.
State that the call or SMS came from or went to.
Country that the call or SMS came from or went to.
Campaign name. We like to use our phone number that placed or received the call.
Campaign source. "Twilio" works for us but you can use whatever you want.
Campaign medium. We use "Phone" or "SMS" but you can use whatever you want.

Response

NameValue