How to add anchor links to email messages

In this article, you will learn how to add an anchor link to email message content in Ortto.

NOTE: Anchor links are not supported by our click tracking system. Therefore you need to deselect the Track link clicks option at the Setup step when creating the email message. This will consequently prevent you from tracking clicks on that email, however, there is a workaround described below.

NOTE: Although most email clients support anchor links, there are still some that don't, especially mobile clients such as Gmail for iOS. However, you can hide the anchor link on mobile. Learn more below.

To add an anchor link when creating your email message content:

  1. Add an HTML block immediately above the section where you want the person to go when they click on the anchor link.
  2. Paste the following code in the HTML block:

html

<a name="anchor"></a>

Feel free to replace "anchor" with another keyword of your choice.

See the GIF below which demonstrates these two steps:

Click on the GIF to maximize it

NOTE: This HTML block will be completely invisible, recipients won't see it.

3. Next, at the element (e.g. a section of text or a button) you want to link to the anchor element you placed at steps 1 and 2, add a link.

4. In the URL field, insert the same keyword you used for your anchor element, beginning with a "#". In this case: "#anchor".

See the GIF below which demonstrates this step:

Click on the GIF to maximize it

Some mobile email clients still don't support anchor links. In this case, you might want to hide the anchor link on mobile. To do this, simply click on the element where the anchor link is (in this case, the button), and select mobile in the Hide on section.

See the GIF below which demonstrates this step:

Click on the GIF to maximize it

As mentioned in the first note of this article, anchor links are not supported by our click tracking system. If tracking clicks on that email is not so important to you, you can deselect click tracking for the entire email at the Setup step.

To do this:

  1. Navigate to the Setup step.
  2. Click on Show advanced options.
  3. Deselect the option Track link clicks.




To use an anchor link without having to disable the click tracking for the entire email, you have to add the anchor link via a HTML block and add the data-notrack="1" parameter in the <a> tag like this: <a href="#anchor" data-notrack="1">Jump to call to action</a>

This data-notrack="1" parameter will disable click tracking only for the anchor link, and all other clicks on that email will continue to be tracked as normal.

Similarly, you can do the same with a button:

html

<a href="#anchor" class="mybutton" style="display: inline-block; padding: 10px 20px; background-color: #3498db; color: #fff; text-decoration: none;" data-notrack="1">Jump to call to action (anchor link)</a>



All set! The end result should be something like this:

Click on the GIF to maximize it