How to Install Disqus Manually Using the Universal Code
Articles Blog

How to Install Disqus Manually Using the Universal Code

August 18, 2019

In this video, I’m going to show you how
to install Disqus manually using the Universal Code. Before we begin, make sure you have the ability
to edit your website’s code directly. For this tutorial, we’ll be using the Disqus
Blog. Right now, there aren’t any comments. Let’s add Disqus to the site. To get started, you’ll need to first create
a Disqus account and register your site at On the sign up page, create your account. Select “I want to install Disqus on my site” Create your site and select a category. Next up, select the plan that’s best for
you. Finally, this brings us to the instructions
for installing Disqus using the universal code. Let’s take a look at that next. Here’s the JavaScript code that we will
be adding to our website. We find that most sites generally place Disqus
at the end of the article page. Let’s take a closer look. There are three parts to the embed code we
wanted to highlight. First, the #disqus_thread

. This is where the comment box is dynamically
loaded onto the page, so make sure to include it above the embed script as shown here. Next, make sure you update the line containing
embed.js with your site’s shortname. You can find your shortname in the Disqus
General Settings. Lastly, configuration variables. These define how Disqus behaves on a page
and are included within the disqus_config function. The two most important variables you need
to define are the page URL and identifier. The URL variable is the canonical URL for
the page and tells Disqus the location a discussion thread belongs to. The identifier is a unique value that Disqus
uses for identifying the page and discussion thread. We recommend using a unique ID that is unlikely
to change in the future as the identifier. These two values can be dynamically generated server-side and will vary depending on your platform or CMS. Here are two examples of how you can configure
these two variables in WordPress and Hubspot, using functions and predefined variables specific
to each CMS. Let’s add our updated embed code onto our
site now. On the Disqus Blog, we use Hubspot as our
CMS. Let’s jump to the Content Settings
where we can add the embed code directly to our blog template. We want to include it in the Blog Post Footer
HTML so that Disqus appears at the end of every blog post. Let’s save those changes now and head back
to our site. We’re back on the Disqus Blog. Looks like everything is set up correctly. Go ahead and post a comment if you like. I hope you found this tutorial helpful. Thanks for watching.

Only registered users can comment.

  1. Unfortunately, this tutorial only works if you have just created a Disqus account. Is there no way for one to install Disqus on their website if they ALREADY have a Disqus account?

  2. After following the above steps. I am getting the error "No 'Access-Control-Allow-Origin' header is present on the requested resource." Even after adding the domain as a trusted domain doesn't solve the problem. Any Help.

  3. what will you give me if i give you space in my website, i mean i need good traffic, taboola is giving traffic who are giving ad space in their website unfortunately they are misbehaving on many grounds pretenting to be hifi than google adsense who are leaders in ad space…

  4. if you give me traffic and i get to earn my livlihood then i can give you space in my blogger website..

Leave a Reply

Your email address will not be published. Required fields are marked *