With more and more visitors using mobile phones, it makes sense to make it as easy as possible for them to use our phone numbers. If set up properly, we will also be able to track how often visitors contact us via mobile phone from our webpages.
There are two parts to these instructions:
- Make your phone number a link
- Add Event Tracking to that link
How to make a phone number a link
Making a phone number a link is similar to making an email address a link: you simply tell the browser that it's a link (using your 'a href' tag) and then indicate that it's an email by adding 'mailto:' to the link. With a phone number, instead of using 'mailto:', you add 'tel:'.
The following steps are for if you are using WordPress to edit your pages (however, using other tools will probably involve similar steps):
- Highlight the phone number that you would like to make into a link
- (In Visual mode,) click on the 'Insert/edit link' icon (it looks a little like a chain)
- In the URL field, type 'tel:' and the phone number with no spaces
- Click 'Add Link' and you've added the link to your page!
How to add Event Tracking to that link
The second half of tracking phone number usage is that Event Tracking must be added to the link. Full instructions for adding Event Tracking to a link (within the York context) can be found at the 'How to Set Up Event Tracking' page.