دوستان من از این کار یک لگد می زنند ، زیرا من به ندرت تلفن خود را پاسخ می دهم ... اما سلام ... این در مورد کمک است خود را شرکت، نه مال من! با افزایش شدید آیفونها، اندروید و سایر گوشیهای هوشمند، واقعاً زمان آن فرا رسیده است که سایت خود را برای استفاده در مرورگر تلفن همراه بهینه کنید.
شرکت ها می بینند که بخش قابل توجهی از بازدیدکنندگان خود از طریق دستگاه های تلفن همراه وارد می شوند. داشتن یک وب سایت واکنش گرا که در دستگاه تلفن همراه عالی به نظر می رسد، دیگر یک گزینه نیست، بلکه یک ضرورت است.
در اینجا چیزی است که اغلب هنگام ایجاد یک تجربه تلفن همراه نادیده گرفته می شود… پیوند دادن شماره تلفن های شما تا کاربران موبایل بتوانند به راحتی روی آنها کلیک کنند و تماس تلفنی را شروع کنند. نحو کاملاً ساده است:
13172039800
معمولی برچسب لنگر با یک لینک وب از یک URL در مقدار استفاده می کند ، یک لینک ایمیل از آن استفاده می کند رایانامهsynt نحو شماره تلفن به سادگی است مانند. من مقدار را با و بدون پرانتز، نقطه و خط تیره آزمایش کرده ام و به نظر می رسد همه چیز در iPhone و Droid کار می کند. با این حال، توصیه میکنم کد کشور را در شماره تلفن اضافه کنید و تمام خط تیرهها، فاصلهها یا نقطهها را در مقدار href حذف کنید.
اگر می خواهید اندازه گیری کنید که چند نفر روی این پیوندها کلیک می کنند، می توانید مقاله ما را در مورد نحوه انجام این کار بخوانید با استفاده از Google Tag Manager یک رویداد Google Analytics اضافه کنید.
Genius Doug! Plan to start using that on all of my client sites. Okay if I post this on my blog? Of course giving you full authorship. Very cool! 😎
So is there any reason NOT to put parentheses, periods, or dashes in a phone number? And does the html phone number act like a title tag? Is there any SEO benefit to doing a title tag within the href code?
@edeckers The RFC3966 standard doesn’t appear to support parenthesis but do support a ton of other options and symbols for international calling, extensions, etc:
http://www.ietf.org/rfc/rfc3966.txt
As for SEO, I don’t see why not! Perhaps the business name + “phone number” could be a good way to implement!
Hi, that’s a cool trick but I tried this and Firefox gave me an ugly error message saying it didn’t know how to read the link. To me, it isn’t worth an ugly error message when someone clicks the link on a desktop just to have a mobile phone be able to access the link. “Long-press” on the phone number on Android and it automatically tries to call a number anyways. Am I wrong? Is there a work around?
It’s definitely targeted to the mobile user, In House.
You can always avoid that by browser detection. Put it in a div that is hidden for non-mobile/larger resolution browsers.
Thanks for this referrer post Doug:)
Thank you so much. simple like you said, yet efficient. You can go a couple steps further and make it link to an icon and create a title in the anchor tag to display your phone number and further instructions for users who hover their mouse over the icon. Thanks again!
can we also add text to the hyperlink phone number?
I believe the href variable only allows numbers… however, you could put whatever text you’d like within the anchor tag itself.
This is a great trick! I am going to start adding this to sites from now on. Thanks!
I’m not 100% sure (and I know this is a pretty old discussion so this might not be relivent) but don’t most smartphones these days automatically do this now?
@ facebook-502306174: موارد منفی بسیاری انجام می شود ، اما تعداد زیادی نیز به اشتباه شکل می گیرند مگر اینکه آن را تعریف کنید.
با تشکر.
Just a simple correction … you said you recommend we “keep everything but the actual numbers IN the href value”
I’m sure you mean “keep everything but the actual numbers OUR OF the href value”
Or else you’d just be dialing a bunch of punctuation 🙂
Thanks Brian!
Thanks Douglas, What is the Social Media Bar you are using? Your blog looks great and you have a lot of great content. Would love to connect on Google Plus. Thanks again
Thanks Dean! After much searching around the net for a great solution, I landed on افزونه. It has a ton more features that we don’t use – but it’s very flexible!
I still don’t know from this column, how to email a phone number – to a cell phone, so my boss can just tap it and call.
Hi Dee, your email software would need to support HTML and the ability to add the hyperlink we describe above. This article was more about how to do this on a mobile website, not an email.
Hi Douglas, how well does this work for international callers? Do you think it’s best to use an international (e.g. +44) number, or a local area code?
To be honest, Ben, I believe it works flawlessly. I believe many international callers use local area codes. Nigeria scam artists immediately come to mind. 🙂
Hi, Can a hashtag be used as a hyperlink to start a phone call? I heard it mentioned the other day but have not seen it. Thank you!
I’ve not seen this yet. I suppose you could write some kind of plugin or script, but it’s not a native HTML function.
How do I create a “call now” button in an email marketing program such as Microsoft Publisher? Also how would I put it into mailchimp?
So I do not need to include – or . between the numbers? Also, how would you include an extension so the hyperlink will call the extension directly?
Within the href value, you don’t want any dashes or dots between the numbers. Within the anchor text, you can write anything.
Great article – very helpful. Thanks!
Great Article.
Hi Douglas, Thanks so much for sharing this code.
Great tip Doug! Thank you. This article is more relevant, 6 years later with everything going mobile.
It works!! Thanks Doug!! 😉
با تشکر از کمک شما!
Very informative tutorial! Actually, I like the aspect of a “click to call widget” instead of a “clickable phone number” better. Having tried out the Callback Tracker plugin on my site, I see a lot more results with the ability to call my leads, instead of having them call me. Personally, I see it as necessary on most sites. Here is the link to plugin https://callbacktracker.com/plugins/wordpress-click-to-call-plugin-install-tutorial/
Very cool, thanks for sharing!