Mobile app version of vmapp.org
Login or Join
Si4351233

: Tradeoffs of including alt attribute in tracking pixel I work at a company with a very prolific tracking tag, which uses a tracking pixel to pass information. Currently, our tag uses a bare

@Si4351233

Posted in: #AltAttribute #Seo #Tracking

I work at a company with a very prolific tracking tag, which uses a tracking pixel to pass information. Currently, our tag uses a bare <img> inside of a <noscript>, and the image does not have an alt attribute.

Our SEO wants to add an alt with some keywords to the tracking pixel, but I noted that the Facebook and Google pixels do not do this. I'm unable to justify my resistance to making this change besides a strong gut-feeling and comparison to competitors.

Is there any technical or SEO reason why this would be a bad idea? Have Facebook and Google simply overlooked this, or perhaps they're aware it offers no benefit - but wouldn't do any harm either.

I did note a few older threads discussing that all images should have an alt and that in the case of tracking pixels, an empty alt would be most appropriate. However, neither FB nor Google have an alt at all.



This question is not about how to track users on our site. My company is providing the tag that others use for their tracking. We're the second most prolific web tag behind Google Analytics. If I add an alt attribute, it will be included across all websites who install our tag moving forward. This is not about adding an alt attribute to a single tag on our own website.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

3 Comments

Sorted by latest first Latest Oldest Best

 

@Shanna517

The answer from the HTML perspective


Almost every img element must have an alt attribute.

Almost, because there are two exceptions: under certain conditions, if figure is involved, and if a markup generator is unable to obtain a suitable alt value from the author. But these exception don’t apply to your case.
In your case, the alt content must be empty, because the image is not intended for your visitors (i.e., it’s not relevant content).

The alt guidelines in the HTML spec mention a case like yours:


If an img element is being used for purposes other than showing an image, e.g., as part of a service to count page views, use an empty alt attribute.



The answer from the SEO perspective

It should have no relevance to SEO, as search engines would have no reason to be interested in tracking pixels. Unless, of course (like always), if you use it with bad intentions.

Adding keywords to the tracking pixel’s alt content would certainly be such a bad intention.

There is no good reason why this should be done (it goes against the HTML spec, it’s bad for accessibility, it serves no purpose for your human visitors), instead it smells like keyword stuffing. While it’s probably safe to assume that most search engines don’t fall for this anymore, this doesn’t make it okay or safe to do.

10% popularity Vote Up Vote Down


 

@Turnbaugh106

Unless there is a <a>surrounding that <img> then you run little risk of being penalized no matter what keywords you decide to use in the ALT. It may, however, affect your link diversity profile with Google, it's hard to say for certain because I don't think there's ever been a large-scale case study of what you're asking.

It is, however, likely to violate Google's recommended guidelines or Terms, because there's never any reason to have irrelevant keywords in an alt tag unless you're attempting to manipulate the search result.

HOWEVER!!! I do not approve for obvious reasons

If your site is potential going to use a 'FAKE' alt attribute then you are potentially making your customer's sites have less accessibility for impaired users.

Use the ALT for users, not search engines!

The ALT tag was never designed for search engines, it was designed for impaired users. If you care about accessibility and you should not promote this method.

The correct alt tag would be:


A visible 1x1 white pixel should have the alt="white pixel"
A invisible 1x1 white pixel should have a blank alt alt="".


If you want your branding to appear in the ALT then use a 16x16 logo rather than a pixel. It'll only increase the image by a few bytes if done correctly. But if the pixel is never directly visible on the page then it would not need a ALT tag value, keep it blank. Having one would be merely to satisfy Google insights and other website checkers.

10% popularity Vote Up Vote Down


 

@Deb1703797

If you must use a 1-pixel image to track information, then to please the world (including SEO testing tools), include the ALT tag and set it to ".". After all, a dot is a pixel.

If you want to track information about a user while they access your pages, there are alternate ways of doing it.

One way (without the greatest amount of security) to do it is to pass the information as part of the URL and continue doing it until the information is no longer needed. create a simple HTML form with one text box and a submit button using the GET method and run it. As soon as you type something in the box and click the button, your URL will change from:
www.example.com/whatever

to
www.example.com/whatever?textbox=somedata

That's assuming the box is named textbox and what you typed in was somedata. That's the easiest way to pass information from one page to the next.

Now a better way, which is more difficult and requires some kind of scripting (like PHP and maybe even javascript) is cookies. On the initial page where data is to be collected, set a cookie with any name and value and an expiry far in the future. The next time the guest returns to the page, the cookie can be retrieved. Prime examples of pages that use this are pages that change based on if you're logged in or not such as this page.

But ultimately, I recommend tracking data via cookies as setting a value of a cookie only applies to the guest accessing the page at that time.

Now if you want to receive info about a user at the time they access the page instead of tracking them with the methods above, then consider reading environment variables. For example, in PHP the environment can be read with the $_SERVER variable and information such as the user's IP address and such can be retrieved.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme