Recommendations is an engine that helps recirculate traffic to pages with Disqus installed

Enabling Recommendations

To customize or disable recommended links within your site, go to your Disqus Admin, click Settings -> "Recommendations".


From this page you can customize:

  • Recommendations Placement: this can be show at the top or the bottom of the embed
  • Content Descriptions: you can choose to show or hide brief descriptions of the content on that page
  • Publish Date: you can choose to show or hide the date when the thread was created
  • Comment Count: you can show or hide the comment totals of the recommended pages
  • Date Threshold: you can set how current the threads that appear in Recommendations are, selecting between threads created in the last week, month, 6 months, or year
  • Placement: you can choose whether you'd like Recommendations to appear at the Top or the Bottom of the Disqus embed

Standalone Recommendations

In addition to being shown at the top or the bottom of the comments section, the Recommendations unit can be inserted elsewhere on the page (apart from the Disqus comment section), or on pages without Disqus comments present.

First, you'll want to open your site's code editor, and insert the following script code into the body of the page, ensuring that the EXAMPLE shortname is replaced with your site's shortname.

<script> 
(function() { // REQUIRED CONFIGURATION VARIABLE: EDIT THE SHORTNAME BELOW
var d = document, s = d.createElement('script'); // IMPORTANT: Replace EXAMPLE with your forum shortname!
s.src = 'https://EXAMPLE.disqus.com/recommendations.js'; s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>
Please enable JavaScript to view the
<a href="https://disqus.com/?ref_noscript" rel="nofollow">
comments powered by Disqus.
</a>
</noscript>

You'll then want to insert the following Div into the body of your site. The div's placement will determine where we show the Recommendations unit, so you'll want to make sure that this line is placed in the location that corresponds with where you'd like the unit to appear:

<div id="disqus_recommendations"></div>

If your site is using the DISQUS.reset method for infinite scroll, this can also be used with the Standalone Recommendations unit. To implement with this method, you'll want to use the following reset line:

window.DISQUS_RECOMMENDATIONS.reset()

F.A.Q.

How does it choose which links to recommend?

We will look for recent discussions within the same site and show ones with recent activity. If none were found, Recommendations won't show until there are a few recent discussions with activity. Note that Recommendations will only show discussions using the same shortname.

How can I change a post's title appearing in Recommendations?

Discussion titles are set automatically using the title assigned to the page where the thread was created. If the title is incorrect, it can be updated using the threads/update API call.

Why are there no recommendations showing?

Because article recommendations are based on comment content, not article content, a discussion must have at least a few recent comments to be shown in Recommendations. Recommendations works best for sites with some consistent commenting activity. The Recommendations feature is included with all paid subscription plans.

How do I block certain links?

Close comments for a discussion to prevent it from appearing in Recommendations. However, if there are recommendations showing that should not be accessible to the public, we recommend closing the comments for that discussion and registering a new shortname specifically for your future test discussions. Check out Best practices for staging, development and preview sites for more information.

I have ads enabled on my site, can I still use Recommendations?

Yes, if you have Ads and Recommendations enabled, we'll show both the Ad and the Recommendations unit side by side:

How do I manually set the images for my Recommendations?

You may want to do this if an image is not appearing automatically, or if you'd like a different image to appear in the window for a given thread. To manually set an image on the page for us to scrape, you'll want to add this code (with the appropriate thread image) to the <head> of the page:

<meta property="og:image" content="IMAGE_URL">
Did this answer your question?