Forum Moderators: open

Message Too Old, No Replies

Dynamic Phone Number based on URL

         

BigJas

1:46 pm on Jul 15, 2010 (gmt 0)

10+ Year Member



Hi there,

I have a local client that I'm trying to set up PPC for. To truly track his PPC, I need to track calls. That means I need a different phone number to appear for visitors who come via AdWords.

I think I need these 3 things:

1. Display a particular phone number when a particular URL sends a visitor to his site
2. Display that phone number on all pages of his site, not just the landing page
3. Display that same phone number even after a prospect has closed their browser and come back to his site days or weeks later (this means cookies, I think)

So I guess I have two questions:

1. Does anyone know of an existing solution to this problem?

2. If not, is Javascript the most logical language for this type of thing to be written in?

mack

8:54 pm on Jul 16, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



This could technically be done using server side scripting based on the referring url.

You could then use a session id, or if you do need a longer term solution a cookie might be an option.

rough example...

get referral

$phone="123456789";
if(referral == "adwords")
{
$phone="24681012";
}

Then when ever you place the phone number on the page simply...
echo "$phone";

Save the phone number as a session and pass the phone number on every page load.

This is just a very rough suggestion, perhaps someone will have a more elegant solution.

Mack.

lkboy4u

12:34 pm on Jul 24, 2010 (gmt 0)

10+ Year Member



Definitly You have to cache Phone No. & to be set not to delete when user Sign out. This is possible with PHP Lanuage

londrum

1:07 pm on Jul 24, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



i wouldn't bother if it was me, because of all the other problems that you're going to introduce.

if all you're changing is a telephone number, then you're going to get duplicate content issues for every page containing a phone number. you'd have to noindex the lot of them.

and what if someone links to a URL? everyone following that link will get the same phone number, when there might be a better one. you'd have to have a back-up page where they can check which number is best.

why not just have a seperate page in the first place, like most sites do. you can make it clear on there which number is best, maybe with a simple drop-down menu for each area, or have a postcode search.