If you’re reading this, we’ll assume that dynamic number insertion is up and running for text numbers, and now you’d like to dynamically swap an image that contains a phone number.
- Destination number: The number that rings at your business when one of your tracking numbers is called. This is typically your business phone number.
- Tracking number: One or more telephone numbers that route to your destination number and allow you to track incoming leads.
Supported image placements
- <img> tags: Dynamic image replacement supports images that are loaded from your HTML via an <img> tag.
- CSS: Dynamic image replacement supports images that are loaded via CSS. To use dynamic image replacement with images loaded via CSS, you must add the class "cr_image" to the element that contains the targeted image.
Supported file types
All common image formats can be swapped, including .gif, .jpg, and .png.
Set up image swapping
For this example, assume that header.gif is the name of an image that contains your swap target.
- Locate the images containing your phone number.
- If you are using images loaded via CSS, add the class "cr_image" to the element that contains the targeted image.
- Rename your image so that it contains your swap target in the file name. For example, if your phone number is 555-444-3333, copy the image to header.5554443333.gif
- Using an image editor, create a new image for each tracking phone number. Save the image and follow the same naming convention. The file type must be the same for all images. For example, if your tracking numbers are 555-111-2222 and 555-111-3333, create header.5551112222.gif and header.5551113333.gif
- Upload all of the images to your web server.
- Replace all references to header.gif with header.5554443333.gif
- You’re done! When you test dynamic number insertion, you’ll see that the image is swapped too.
Because dynamic image replacement relies on existing images, be sure to create a new image for every new tracking number you create in CallRail.