6

I just noticed this JavaScript file is embedded in many pages of my site where Disqus comments is enabled.

http://a.disquscdn.com/next/embed/alfie.f51946af45e0b561c60f768335c9eb79.js

Any idea what is its purpose?

I found out that it automatically adds a click event listener to every link (both internal and external links) and the click event does some redirection. It was not a significant problem until I realized the redirection was affecting many links to an external website I have in my site and all of them ended up in the home page.

Its not a matter of my URL's build to the external website in href or parameters as copy pasting the URL directly into browser (no redirection) works fine.

Is this a Disqus feature for tracking or something that can be configured?

Screenshot of click event listener (Firefox debug)

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
user5151986
  • 111
  • 4
  • I had the same "problem" after using disqus for almost two years. It seems to affect only links to eCommerce (so some people might never notice that happening in their website) – Tiago Queiroz Mar 22 '16 at 20:42

2 Answers2

5

It's the "Affiliate links" enabled option in Disqus Setup > Advanced

https://help.disqus.com/customer/portal/articles/851667-affiliate-guide

user5151986
  • 111
  • 4
1

Updated help article link:

https://help.disqus.com/customer/en/portal/articles/2425431-how-to-disable-affiliate-linking

Affiliate linking is an optional feature that automatically replaces outbound product links on your site with affiliate links,

To disable or enable affiliate linking, visit the Admin > Settings > Advanced.