Disqus Comments Growth Hack
This tip allows you to redirect a user after they leave a disqus comment on a specific blog post.
If you use Disqus on your blog there’s a few nice things you can do to drive more community discussion. The one I’ll be focusing on in this guide is how you reward the user once they’ve left a comment.
Disqus has a callback that triggers when a user leaves a comment.
This essentially allows you to do anything you like after a comment. This includes things like:
- Redirecting the user somewhere else
- Triggers an opt-in form
- Tracking the comment in Analytics
In this guide we’re going to look at how to redirect the user somewhere after they comment. Specifically inside WordPress.
One of the best ways to drive discussion is to give users an incentive. In fact, I gave you an incentive to comment on a blog post to come here. It worked right? This redirect trick allows you to send the user to the desired incentive location after their comment.
Just a note: You absolutely should make users aware that you are doing this.
To redirect the user we need to do two things. First we need to include the callback script, then we need to use window.location.href to send them to the desired URL.
<?php $commentredirect = get_post_meta($post->ID, 'redirect', true); if ($commentredirect) { ?> <script type="text/javascript">function disqus_config() { this.callbacks.onNewComment = [function() { window.location.href = "<?php echo get_post_meta( get_the_ID(), 'redirect', true ) ?>" }]; }</script> <?php } ?>
This should be included just before the Disqus comments script inside your Theme. We’ll be using a custom field inside the post to trigger the redirect. The script above also looks to see if the custom field exists first before executing the script.
Once that’s all setup we just need to add a custom field to our post with the redirect URL. In the case above our custom field is named redirect.
Enjoy!
Keep On Growing 🙂
You Might Also Like
How We Grew SaaS Inbound Traffic By 300% In 6 Months
We break down how we grew our inbound traffic by 300% in just 6 months.
15 Ways to Align Your Content Marketing Strategy With Business Objectives
Understand how having a solid content plan in place and executing on it can propel your business upwards.
Simple + Effective Content Upgrades For E-Commerce Stores
This technique focuses on creating simple lead generating content upgrades for any E-Commerce store.
The 5 Content Pillars That Drive 95% Of Our Inbound Leads
95% of our new customers come from inbound marketing. Here's the content playbook we use.
Create Content Upgrades or Lead Magnets Easily
Learn how to create Lead Magnets into your content to incentivize opt-ins for your newsletter.
Stuart McKeown
Stuart McKeown is one of the Co-founders at Gleam. Aside from writing and helping businesses grow, he also enjoys sound design and drinking tea ☕️