Rate this page:

Call tracking

Call tracking lets you analyze the effectiveness of marketing channels and optimize your campaigns accordingly. It's easy to implement call tracking using Voximplant and get all information about calls going via the system, including dialed number, time of day it was dialed, call duration, number where it was forwarded, call record and much more. You can get phone numbers either from Voximplant directly, or connect your own phone numbers using SIP trunk.

Let's create our Voximplant call tracking application:

  1. Login into the Voximplant control panel.
  2. Create new application in the Applications section and call it calltracking.
  3. Create new scenario in the Scenarios section with the following code:
Scenario code

Scenario code

  1. Edit your application at the control panel and add an app rule to forward inbound calls to the created scenario. You can call it InboundTracking, no need to change default Pattern, don't forget to drag'n'drop the scenario to Assigned list before pressing Add button.
  2. Buy phone number(s) in Phone numbers section of the control panel and then assigned it to calltracking app.
  3. If you didn't forget to change wsURL in the scenario to something that returns phone number for call forwarding then you can make a call to the number you've bought and see the tracking in action. You can also make a trick to see the call info in the logs – change the lines 23-25 to emulate a successful request to a 3rd party analytics tool:
See the tracking

See the tracking

It's a very simple example of a call tracking app. You can modify it to let the scenario forward the call to a few numbers simultaneously or try to call them one-by-one till somebody answers. If the call wasn't forwarded correctly you can always make a callback to the customer (you don't want to lose your customers, do you?).

Call history

Call results can be obtained from the call history. To access them, you can either go to the Calls section in the Control panel or use the GetCallHistory API method.

Save some data to the customData parameter and then use it, e.i. to get statistics, through the call_session_history_custom_data parameter of the aforementioned GetCallHistory method.

Read How to use session logs for details.