Divi Image Test

Divi image links don’t have a title attribute set and there isn’t a way to set them using the Divi UI.

Code Examples

Good

Even though there’s no title or text set in the link in this code, it will still supply a meaningful label when it’s click event is sent to GA by using the title text in the image’s HTML.

<!-- Note that the image's title and alt attributes are set. -->
<a href="https://www.elegantthemes.com/preview/Divi/wp-content/uploads/2014/04/beaten-path.jpg" class="et_pb_lightbox_image" title="">
  <span class="et_pb_image_wrap ">
    <img loading="lazy" src="https://www.elegantthemes.com/preview/Divi/wp-content/uploads/2014/04/beaten-path.jpg" alt="The Beaten Path Alt Text" title="The Beaten Path Title Text" width="auto" height="auto">
  </span>
</a>
Example goal of having meaningful event labels in GA reports.

Bad

This code usually generates a “(not set)” label in Google Analytics when it’s tracked. It’s because the image’s title and alt text are blank or don’t exist at all.

<!-- Note that the image's title and alt attributes are NOT set. -->
<a href="https://www.elegantthemes.com/preview/Divi/wp-content/uploads/2014/04/beaten-path.jpg" class="et_pb_lightbox_image" title="">
  <span class="et_pb_image_wrap ">
    <img loading="lazy" src="https://www.elegantthemes.com/preview/Divi/wp-content/uploads/2014/04/beaten-path.jpg" alt="" title="" width="auto" height="auto">
  </span>
</a>
Example of what we want to avoid.

Live Demo Examples

The Beaten Path Alt Text

Link title not set. Image title and alt set. Image title is used. Good 🙂

Stream Alt Text

Link title not set. Image alt set. Image alt is used. Good 🙂

Link title not set. No image title and alt set. Link title stays unset. Bad 🙁

Link title set. Link title is used. Good 🙂

The plugin makes the above possible is the Link Helper Divi plugin. Visit the repo on GitHub and download or fork your own copy.

Sample images and code above provided by Divi’s Image Module page.