Dynamic Phone Number Insertion in Drupal?

Events happening in the community are now at Drupal community events on www.drupal.org.
ben finklea's picture

We use a service called IfByPhone that offers "Dynamic Phone Number Insertion" (DPNI). This is a service that swaps out the phone number on your site based on where the visitor came from. It's like using a different phone number in the yellow pages, on a billboard, and on a TV ad. That way, when you get your phone bill, you can see how many people called you from each ad. This could work similarly with the search engines. Someone came from Google, show them number A. Yahoo, show them number B. Drupal.org, show them number C. Etc.

All the phone numbers would probably be different 800 numbers that lead to the same primary phone number for your business. However, they could really be any different numbers leading to anywhere.

The drawback of these paid services (there are many of them) is that they own the phone number. If you cancel, they take the number and recycle it. And, it's not a free service; they charge a monthly fee plus a price per minute.

My thought is that we can do the same thing in Drupal for free. Maybe not as robust a reporting as the paid services but free and easy to implement.

My thoughts along the development lines are as follows:

  1. Module needed: Site Phone Number. This gives you a field (in the Information screen?) that lets you put in your site's default phone number. It also creates a token for the default number. Say, $site_phone_number.

  2. Go through your site replacing your hard coded phone number with the token. (The alternative is to use javascript to find it dynamically...but this happens after the page loads causing a stutter effect and adds overhead.)

  3. Use the Google Keyhaviour module to define an action based on referrer. If they came from Google, replace $site_phone_number with 1-800-123-4567.

The obvious next step would be to do it based on both referrer and keyword. So, if they came from Google and searched on the word "hats", show them 1-800-234-5678. This lets you get keyword visibility from your call logs.

Is this the right way to approach this? What would make it better or easier? Are there any developers out there who would like to work on this? I'd be willing to sponsor such a project.

Cheers,

Ben Finklea
CEO, Volacci
ben@volacci.com

Comments

interest and ideas

greggles's picture

We're doing a similar thing for a client right now. They are using a service called Voicestar from Marchex. They use Javascript replacement and the stutter effect is real and painful for this site.

I think Javascript probably is the right way to do this, though, for one major reason: If you tried to do this in PHP, then you can't take advantage of Drupal's caching nor Varnish nor even caching from deeper layers (like the cache_content or cache_filter which are very difficult to disable).

We could potentially do this work and potentially help in sponsoring it. If that seems good to you please contact me. I'm try to ping the client this week to see what their thoughts are on the topic.

Call Tracking Numbers

ifbyphone1's picture

Hey Ben,

First of all, thanks for the shout out to Ifbyphone.

May I make just one point of clarification? When you purchase Call Tracking numbers from Ifbyphone, you CAN port your numbers away at any time. You own the numbers, you're paying us to acquire and host them. I can't speak for other providers, but we certainly allow you to take them with you.

If you ever want to chat about Call Tracking, don't hesitate to pick up the phone and call us.

Best,

Elan
Ifbyphone Call Tracking

Search Engine Optimization (SEO)

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: