Web Integration
Disqus avatar
Written by Disqus
Updated over a week ago

Getting started

Before installing Disqus, you'll first need to register a forum, if you have not done so already.

This integration guide isn’t specific to any particular platform, and assumes that you have knowledge of how your website’s system works. Some basic understanding of javascript/html is also recommended.

For many of the most popular platforms (e.g. Wordpress, Blogger, Tumblr etc.), most of these steps are unnecessary as we have integrations which do all of this for you. See our list of available integrations to find out if yours is listed.

Comments embed

The comments embed is the core Disqus experience where most users will spend their time. By putting in a snippet of code on your website, we’ll load all the necessary components for commenting experience on a specific post, article or topic.

This is the basic drag-and-drop embed code that you can use to show the commenting embed.

You can add a unique identifier, specify a link-to URL, a title (among others) to be stored with your thread. These aren't required, but are highly recommended.

This allows you to override the language that the embed UI displays from what you've set globally in your site settings. This is useful for multilingual websites.

You may attach your own javascript to certain events that occur in the Disqus embed. Most commonly this is used for tracking in your own analytics system, but can be used for almost anything that doesn't impact the user experience negatively.

The embed inherits styles from the page it's contained in, and this article explains how that works and how you can override certain elements.

This details how to reload the Disqus thread for AJAX/single-page applications without navigating to a new page.

Disqus will automatically handle HTTPS websites out of the box with the current embed code. See this guide if you haven't updated the embed code, or are having trouble with mixed content errors.

Single Sign-On (SSO) provides a seamless log-in experience to your users by allowing users to sign in to your site and fully use Disqus without again authenticating with Disqus.

Comment counts

You can display a comment count link anywhere on your site to a particular discussion. This involves adding a small script and appending #disqus_thread to the end of your href links.

Best practices

  • If you're using Disqus outside of a publicly-accessible environment, see our guide on Best practices for staging, development and preview sites.

  • If using configuration variables with the embed, set them before loading the page. None of the data you give these variables will apply after the thread is created, so they need to be present before the page is loaded for the first time.

  • Setting a trusted domain in your Disqus admin settings will ensure that no other websites can use your Disqus shortname. Make sure you include all possible domains that you might load the Disqus embed on, or else you'll block yourself.

  • We recommend Reseting and Archiving Large Threads when a discussion on your site grows larger than 1,000 comments. Large threads present some user experience issues, and can be avoided by configuring your automatic close setting.

Troubleshooting

Did this answer your question?