Home / Companies / Twilio / Blog / Post Details
Content Deep Dive

Call Tracking with PHP and Laravel

Blog post from Twilio

Post Details
Company
Date Published
Author
Mario Celi, Paul Kamp, Brianna DelValle, Andrew T. Baker, Jose Oliveros, David Prothero, Kat King
Word Count
2,611
Language
English
Hacker News Points
-
Summary

In a detailed tutorial, Mario Celi explains how to build a call tracking application using PHP and Laravel, integrating Twilio's API to monitor the effectiveness of various marketing channels. The application involves purchasing phone numbers from Twilio for different campaigns and forwards incoming calls to sales representatives while displaying data on these calls through charts. It outlines the process of searching and purchasing phone numbers via Twilio's PHP helper library, associating them with specific lead sources, and handling incoming calls using webhooks to forward calls and create leads. The tutorial covers the backend structure, including the LeadSource and Lead models, to track and associate calls with lead sources, and uses Eloquent queries to generate statistics on call activity. The frontend aspect employs JavaScript and Chart.js to visualize statistics in pie charts, providing insights into call distribution by lead source and city. The tutorial also offers additional resources and related tutorials for PHP developers interested in enhancing their applications with Twilio functionalities.