Follow us @mongoosemetrics on Twitter
Friend us on Facebook
 
 

How To Create Email Alerts From Phone Call Tracking Numbers

This how-to article will show you how to create your own custom email alerts that trigger when a Mongoose Metrics phone number is dialed. The email alert can contain all the call details from the phone call including incoming caller phone number and call time duration. To implement this feature you’ll need access to a web server that can send email through a scripting language processed on a web page. Our example will make use of PHP’s mail function.

Understanding Mongoose Metrics Dynamic Variable Insertion
With all Mongoose Metrics phone call tracking numbers you can elect to have a URL visited every time the tracking number is dialed. An advanced version of this feature exists that enables you to dynamically append to your elected URL variables in real time.

As an example, a URL with the parameter syntax of :
http://www.mongoosemetrics.com?incoming_caller=CALLER_PHONE

would construct the URL if dialed by the number 216.502.2750:
http://www.mongoosemetrics.com/incoming_caller=2165022750

The above example makes use of the Mongoose Metrics dynamic variable CALLER_PHONE which acts as a place holder in the URL string. When the tracking number is dialed and the call is completed, the Mongoose Metrics phone server will see this place holder variable in your URL string and replace it with the actual data from the live call.

Here are some of the dynamic variables available:

CALLER_PHONE - The incoming caller’s phone number.
CALL_DURATION - The total billable length of the call.
CALL_DATE - Date of the call.
MONGOOSE_NUMBER - Trackable phone number which was called by caller.
CALL_DESTINATION - Destination number that trackable number points to.

Step One - Construct Your Tracking URL

  • From the ‘Trackable Number’ tab in our Mongoose Metrics account, click on the ‘configure’ link to the right of your tracking number.
  • Next, construct the URL that will be visited every time your tracking phone number is dialed. To send your email meaningful information about the call, use some of the above dynamic call variables in your URL string. Here’s an example URL string which would be placed after the domain name portion of your URL: /?phone_number=CALLER_PHONE&call_time=CALL_DURATION

When the tracking number is dialed, Mongoose Metrics will construct the URL string and visit the URL. The phone server will replace CALLER_PHONE and CALL_DURATION with the actual data from the phone call. You have now passed from the phone call the call detail information and sent it to a web server for further handling.

Step Two - Creating An Email Script

Our example will use PHP’s mail function. To review, we now will have a web page visited every time a tracking number is dialed. That web page will be visited by the Mongoose Metrics phone server with a URL string populated with the phone call details. You next have to grab the data found in the URL string and insert this into your email alert message. With PHP this is fairly straight-forward. Here’s how:

On the web page that the Mongoose Metrics phone server will visit, place this code snippet above your<html> tag. This code example will look for the URL parameters phone_number and call_duration. If it finds these parameters in the URL string, it will grab their values and send them off in an email.

<?PHP
$phone_number = '-1';
if (isset($HTTP_GET_VARS['phone_number'])) {
$phone_number = $HTTP_GET_VARS['phone_number'];
}
$call_duration = '-1';
if (isset($HTTP_GET_VARS['call_duration'])) {
$call_duration = $HTTP_GET_VARS['call_duration'];
}
?>

Next you need to paste anywhere in the web page code so long as it’s below the above snippet of code. Here’s some sample code. It may be adapted to your needs.

<?PHP
if ($phone_number <> '-1') {
$to = 'me@mydomain.com';
$subject = ' '. $phone_number .' | ' . $call_duration .' - Phone Call Alert';
$message = '';
$headers = 'From: alerts@mydomain.com' . "\r\n" .
'Reply-To: noreply@mydomain.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
}
?>

The above code example will send an email with a subject line only. In the subject line will be the incoming caller’s phone number and call time duration.

Adaptations And Uses

The above information gives you the basic picture and setup. You can now fire off email alerts whenever your tracking number is dialed. Because you implement your own processing code with each e-mail, the variations on what you can do are endless. Here are some additional examples of how to further adapt this method:

  • Send the email if the call duration is over or under a certain call duration length
  • Send the email to different recipients based upon the area code of the incoming caller
  • Send the email if a specific tracking number is dialed
  • Send the email if it’s called from a specific keyword or campaign
  • Send the email based upon the time of the call
  • Instead of an email, why not insert the data into the server’s database for additional processing or advanced metrics. This could include associating the incoming caller’s phone number with a web sales or lead generation conversion or archiving the data as apart of a longer sales cycle.

You may wonder, why send email alerts from trackable phone numbers in the first place? Only you can decide if this implementation provides value to your online marketing campaigns. However, here are some examples of how Mongoose Metrics customers can make good use of this method.

  • Missing Calls. Phone call conversions from paid search campaigns can be quite valuable depending upon your market. Existing phone systems already allow you see missed calls and Mongoose Metrics call detail reports will show you complete call logs. But lets face it, in a sea of phone calls, sometimes you or your clients can still miss the message and not return the call promptly.  If you’re on the go or on the phone a great deal, missing phone calls is a part of life and email alerts can prioritize who to call back.
  • Sales Management. Looking at call detail reports at the end of the day or at the end of the week sometimes isn’t fast enough. Email alerts can be constructed for sales managers so that they can easily see what is going on with phone call leads.
  • Client Notification.  In many business environments it’s not realistic to expect clients to log into reports. However, clients still want to know what’s going on. If a simple subject line email makes the difference between communicating the necessary information the right or wrong way then it can make all the difference in the world.
  • Flexibility. At the heart of Mongoose Metrics philosophy is a commitment to flexible and easy to use products. Email alerts with phone call details is another example of we offer adaptable solutions to your business.
Get More Information

Mongoose Metrics offers simple to use enterprise class phone call tracking services for both online and offline marketers. We want to understand your needs. Please complete the form below and a Mongoose Metrics representative will contact you shortly. You can also contact us directly at 877-784-0496


This entry was posted on Thursday, May 22nd, 2008 at 10:41 am and is filed under Integration. You can follow any responses to this entry through the RSS 2.0 feed. Responses are currently closed, but you can trackback from your own site.

Comments are closed.