Support and sales

Call tracking

Set up a modern call tracking solution to measure campaign effectiveness, accurately attribute calls, and understand caller sentiment to help sales teams personalize interactions.

Woman on a phone call with laptop, discussing a company's ad in Traveler magazine about Tokyo trips.
Woman on a phone call with laptop, discussing a company's ad in Traveler magazine about Tokyo trips.

How to build call tracking

Integrate with your existing stack and start collecting granular call tracking metrics.

Step 1
Get Twilio phone numbers
Purchase a pool of phone numbers from the Twilio self-service portal or phone number API.

Step 2
Map phone numbers and implement counters
Map your phone number to the Twilio number and set up a webhook to count incoming calls.

Step 3
Publish the Twilio phone numbers on ads and websites
Add the Twilio phone number to your ads, websites, landing pages, and any other content.

Step 4
Start tracking calls
When interested buyers call the number, you’ll gather call tracking metrics to understand campaign effectiveness, ROI, and customer insights.

Diagram showing a phone call leading to multiple support agents, highlighting over 10K incoming calls.
Diagram showing a phone call leading to multiple support agents, highlighting over 10K incoming calls.

What you need to build call tracking with Twilio

Build call experiences on the platform that handles 50B+ voice minutes annually.

  • Twilio Programmable Voice logo
    Use Twilio's Voice APIs to customize call experiences, route calls efficiently, and track performance metrics accurately for reliable ROI insights.
  • Twilio Voice Insights logo
    Track call volume peaks so you can staff accordingly and monitor call performance data to spot and resolve issues quickly.
  • Gather even more business intelligence from your inbound calls, including call summaries, customer sentiment, and competitive insights. 
  • Twilio Phone Numbers logo

    Set up call tracking with your choice of more than 200 distinct phone number types, including local, national, mobile, and toll-free numbers.

  • Twilio Task Router logo

    Route calls to the agents with the best skill set to assist and map campaign call traffic to the best resources to elevate your customer experience.

Get started with Twilio call tracking

Sign up for a Twilio account to get started with phone call tracking. Use our quickstart guides to get started with your choice of programming language.

var twilio = require('twilio');
var config = require('../config');
var LeadSource = require('../models/LeadSource');

var client = twilio(config.apiKey, config.apiSecret, { accountSid: config.accountSid });

exports.create = function(request, response) {
  var phoneNumberToPurchase = request.body.phoneNumber;

  client.incomingPhoneNumbers.create({
    phoneNumber: phoneNumberToPurchase,
    voiceCallerIdLookup: 'true',
    voiceApplicationSid: config.appSid
  }).then(function(purchasedNumber) {
    var leadSource = new LeadSource({number: purchasedNumber.phoneNumber});
    return leadSource.save();
  }).then(function(savedLeadSource) {
    console.log('Saving lead source');
    response.redirect(303, '/lead-source/' + savedLeadSource._id + '/edit');
  }).catch(function(numberPurchaseFailure) {
    console.log('Could not purchase a number for lead source:');
    console.log(numberPurchaseFailure);
    response.status(500).send('Could not contact Twilio API');
  });
};

exports.edit = function(request, response) {
  var leadSourceId = request.params.id;
  LeadSource.findOne({_id: leadSourceId}).then(function(foundLeadSource) {
    return response.render('editLeadSource', {
      leadSourceId: foundLeadSource._id,
      leadSourcePhoneNumber: foundLeadSource.number,
      leadSourceForwardingNumber: foundLeadSource.forwardingNumber,
      leadSourceDescription: foundLeadSource.description,
      messages: request.flash('error')
    });
  }).catch(function() {
    return response.status(404).send('No such lead source');
  });
};

exports.update = function(request, response) {
  var leadSourceId = request.params.id;

  request.checkBody('description', 'Description cannot be empty').notEmpty();
  request.checkBody('forwardingNumber', 'Forwarding number cannot be empty')
    .notEmpty();

  if (request.validationErrors()) {
    request.flash('error', request.validationErrors());
    return response.redirect(303, '/lead-source/' + leadSourceId + '/edit');
  }

  LeadSource.findOne({_id: leadSourceId}).then(function(foundLeadSource) {
    foundLeadSource.description = request.body.description;
    foundLeadSource.forwardingNumber = request.body.forwardingNumber;

    return foundLeadSource.save();
  }).then(function(savedLeadSource) {
    return response.redirect(303, '/dashboard');
  }).catch(function(error) {
    return response.status(500).send('Could not save the lead source');
  });
};

Call Tracking with Node.js and Express

See how to use Twilio to purchase phone numbers, forward incoming calls to a salesperson, and display data on calls to each phone number.

Understand your advertising metrics

Get step-by-step instructions to set up call tracking with Twilio so you can track and understand your advertising performance.

Discover new insights with call annotations

Learn how to use call annotations to get subjective contextual information about the voice calls you receive from campaigns.

Prefer not to code? No problem. 

Work with one of our trusted partners to get coding support or explore a pre-built notifications solution. Find a partner

Why use Twilio to build business call tracking?

Everything you need to start tracking calls from offline and online marketing campaigns.

Two colleagues smiling and working together on a laptop in an office setting.
Two colleagues smiling and working together on a laptop in an office setting.

Twilio offers a huge inventory of phone numbers across phone number types. With this depth of inventory, you can assign distinct local numbers to your ads on a dynamic basis to allow for extremely granular tracking.

Dynamically route calls to the right person based on incoming leads. Your call tracking solution can also be tied into an intelligent IVR to collect additional information before connecting to live agents.

Generate reports based on call tracking results to get a clear picture of which sales and marketing campaigns are driving the best ROI for your business. Then enhance those results with context collected from calls to see average response times, customer sentiment, conversion rates, and more.

Twilio call tracking integrates seamlessly with your customer relationships management (CRM) system so you can document your customer journey touchpoints and call metadata without additional work.

See what else you can do

IVR

Help customers self serve with a smarter phone menu that gets them what they need fast.

Contact center

Support customers your way with contact center tools that adapt as your business grows.

Support and sales

Amplify customer support with AI self-service, AI assistance, and cross-channel engagement.