All Collections
Accessibility Help
Tracking Pixel Code - Accessibility Issue
Tracking Pixel Code - Accessibility Issue

Tracking pixels like Facebook's and Google's should be implemented with care.

Updated over a week ago

The use of tracking pixels, such as Facebook and Google, are common ways to monitor how visitors interact with your website. Below is an issue that is often found with some implementations of this code.

Pixel image missing alt

Issue as it appears in DubBot (it may or may not display in current view):

Images missing an alt attribute accessibility xheck displaying in DubBot App

If it does display you will typically find it near the top or bottom of the page.

A tracking pixel <img/> element is set within a <noscript /> element.

HTML Code of a Facebook Pixel

It often gets ignored by those who add the code to their pages. However the image tag would be part of the page flow when Javascript is disabled, so DubBot will still report it as an issue.

Adding alt="" will remove this issue by labeling the image as decorative.

An example of alt="" being added to a tracking pixel would look like the following:

<noscript>
<img alt="" height="1" src="https://www.facebook.com/trackingpixel.png" />
</noscript>

Did this answer your question?