Did you know? Google sees JavaScript links you don’t

Most SEMs are aware by now that Google is parsing JavaScript and processing content within the DOM. We know this not only because Google has flat out told us, but also because it has been tested.

We know all of this — and yet, tools which provide backlink data are only seeing classically formatted <a href> HTML elements listed within a given page’s source code. They specifically are not capturing link referrals from JavaScript redirects, dynamically inserted <a> tag links or URLs associated with JavaScript onclick events — all of which I will refer to hereafter, collectively, as JavaScript-based link referrals.

With the exception of Google Search Console (GSC), whose backlink data is limited, top backlink data providers like Majestic SEO, Ahrefs, Moz Open Site Explorer and SEMrush are not currently reporting on JavaScript-based link referrals.

For example, we set up a test pointing JavaScript-based links at TechnicalSEO.com. Links to these target pages did not previously exist on the referring site.

While the URL “strings” are present in the source code of the page, they are associated with onclick events and not within the href attribute of the <a> element. All three links above have been picked up and reported on within GSC appropriately. With this information, we now know as fact that Google has a larger understanding of what qualifies as a “link referral” in today’s digital ecosystem.

Unfortunately, these same links are not reported across the previously mentioned top data providers.

So, you probably have some questions…

Question 1: Is this really a concern?

A lack of visibility into JavaScript-based link referrals could be problematic for webmasters. Because Google is able to parse JavaScript, these types of link referrals are also able to be considered when analyzing profiles for webspam. Google is likely considering these JavaScript-based links within the context of link penalties, and an inability to see this data within backlink data tools hinders webmasters’ ability to ensure their profiles are within compliance.

Question 2: But Google is providing these links. Shouldn’t GSC data be enough to work from, since it’s Google’s own data?

Unfortunately, “Links to your site” data can’t show you everything that you need to see in order to conduct a thorough review of a given backlink profile. The data is limited, providing just 1,000 rows per Example and Sample report. As a matter of best practice, those attempting to review and monitor their backlink profiles are strongly encouraged to utilize multiple data providers — not just Google Search Console.

There have even been occasions where the example link provided by the Google Webspam Team in a Manual Action message was not found by any backlink tools, including GSC. While likely a corner case, it is an example of why multiple backlink data providers should be used to get a full picture of a given backlink profile. It is also representative of why it is so important that other tools expand their available data by integrating JavaScript parsing.

Question 3: Are JavaScript-based link referrals weighted the same as traditional redirects or links?

Yes. Not only does Google look at JavaScript redirects the same as 301s, but Mariya Moeva, a Search Quality Team member at Google, also confirmed at SMX West 2017 that Google looks primarily at the DOM rather than the source code of a page. Therefore, dynamically inserted <a> elements would be weighted the same as if they were located within the source code.

Question 4: How many backlinks could be impacted by this?

It’s hard to say with any certainty, but OverStack conducted a survey in 2016 of over 56,000 developers across 173 countries. Across all groups, JavaScript was “by far the most popular technology,” as reported by 85.3 percent of full-stack developers, 90.5 percent of front-end developers and 54.4 percent of back-end developers. This data indicates a high usage of the JavaScript language within day-to-day web development.

While dynamically generated links, JavaScript redirects and onclick events aren’t common practice in web development, sometimes they are necessary — especially for programmatic solutions at enterprise levels. With high adoption of JavaScript in web development, there’s greater chance of it impacting the way your link referrals are being coded (and thus reported).

Question 5: So, what am I supposed to do with this knowledge?

All we can do is wait for backlink data providers to catch up to JavaScript-based link referral reporting. When you think about it, it took Google some time to get to this point, even with a lot of resources behind the effort. Tools today are up against a very wide web, and parsing JavaScript for every page in their indices requires vast resources on their part. Dmitry Gerasimenko, CEO of Ahrefs, tells us: “To execute JS for every page at our scale [would] require 10,000-15,000 servers, and we believe our customers are not ready to pay for that yet.”

It’s an honest point, and it paints a clear picture of just how difficult providing this level of data can be.

In the meantime, and despite the growing gap that exists in backlink data visibility right now, there is still a good amount of data to be had to make an honest effort in rectifying any webspam issues and showing due diligence to Google’s Webspam Team.

Closing the gap

Gathering as much backlink data as possible is a crucial component to ensuring the success of submitted Reconsideration Requests. Doing so enables backlink reviewers to analyze as close to a majority of a given backlink profile as possible, providing a more complete analysis of webspam patterns that may be relevant to the cause of penalty.

It is for this reason that current backlink data providers are encouraged to build JavaScript parsing functionality into their crawlers and get that reporting out to users in a timely fashion.

Be sure to keep an eye on top of data providing tools for when this functionality becomes available, as three out of four preferred backlink providers we spoke to confirmed that these developments are already in progress. (Thanks, guys!)

Opinions expressed in this article are those of the guest author and not necessarily Search Engine Land. Staff authors are listed here.

About The Author

Kyla Becker is a seven-year digital marketing veteran who specializes in backlink analysis, penalty removal, content strategy, and influencer marketing. Kyla is currently a Technical SEO Manager at Merkle, Inc. and has published content on topics relating to backlink and content best practices, webmaster outreach, and more.