Understanding Mongoose Metrics Dynamic Variable Insertion
All Mongoose Metrics phone call tracking numbers allow for the client to have a URL visited every time the tracking number is dialed. An advanced version of this feature enables you to dynamically append all the phone call details 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 that 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 recognize this place holder variable in your URL string and replace it with the actual live call data.
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 called by the original caller.
CALL_DESTINATION - Destination number that trackable number points to.
Step One - Construct Your Tracking URL
- From the ‘Trackable Number’ tab in your Mongoose Metrics account, click on the ‘configure’ link to the right of your tracking number.
- Next, construct the URL which 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 the phone call details to the 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 and the web page will be visited by the Mongoose Metrics phone server with a URL string populated with the phone call details. You then 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($_GET['phone_number'])) {
$phone_number = $_GET['phone_number'];
}
$call_duration = '-1';
if (isset($_GET['call_duration'])) {
$call_duration = $_GET['call_duration'];
}
if ($phone_number <> '-1') {
$to = 'test@yourdomain.com';
$subject = ' '. $phone_number .' | ' . $call_duration .' - Phone Call Alert';
$message = 'Phone number alert';
$headers = 'From: alerts@yourdomain.com' . "\r\n" .
'Reply-To: alerts@yourdomain.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 idea and overall setup. From this you can now fire off email alerts whenever your tracking number is dialed. Keep in mind that since this implementation requires you to develop your own processing code to construct the email. Hence, 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.
We have given you some example of what you can do with this method, but 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. Here are some examples of how Mongoose Metrics customers make good use of this method.
- Missing Calls. Phone call conversions from paid search campaigns can be quite valuable depending upon your market. We can all see missed calls with our existing phone systems 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 as quickly as possible. 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 provide a tremendous amount of urgency and clarity in deciding who needs to be called back first.
- Sales Management. When phone call leads are valuable, 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’s going on with phone call leads and have a quick measurement of call volume and phone call time durations.
- Client Notification. We are swamped with data and reports. In many business environments it’s just not realistic to expect clients to log into reports and invest time digesting the data. Yet clients still want to know what’s going on. If a simple subject line email makes the difference between communicating the right information the right way, it can make all the difference in the world.
- Flexibility. At the heart of Mongoose Metrics' philosophy is delivering a phone call tracking service that’s flexible and can deliver phone call tracking data optimized to your needs. Sending email alerts with phone call details is another example of our commitment to provide information that is adaptable to your way of business.
