Posts Tagged ‘facebook connect’

Disqus updated, Facebook Connect messy statistics issue reoccurred

Friday, March 27th, 2009

Yesterday Disqus commenting system has launched an update, and previously reported Facebook Connect caused messy statistics issue showed itself again with upgraded WordPress plugin. Since workaround offered at Disqus blog is not working anymore, I’ve tried to fix things manually.

Disqus plugin tells Facebook Connect to look for the xd_receiver.htm at the Disqus plugin directory with the variable facebookXdReceiverPath. Problem is, Disqus plugin doesn’t ship with the xd_receiver.htm, and that’s why Facebook Connect’s attempts to reach this file are returning with errors, and causing statistics mess.

Here is my solution;

  1. Remove the previous workaround code, if you’re still using it.
  2. Download the xd_receiver.html file here (right click and save as) and change its extension from “.html” to “.htm”.
  3. Upload the renamed file to your Disqus WordPress plugin directory (to /wp-content/plugins/disqus-comment-system).
  4. You’re done.

Hope you find it useful.

Update: Disqus team repacked the plugin with the previously missing xd_receiver.htm. Just update the plugin and your problem will be solved.

Fix for the Disqus’ Facebook Connect caused messy statistics issue

Friday, March 13th, 2009

I’ve recently started using Disqus for the handling of this blogs’ comments. Service has really nice features, including integration with Facebook Connect, which unfortunately seem to mess with your statistics if you are using StatCounter or Google Analytics (I’m using both).

There is a solution posted on the Disqus blog and I’ve got a tip for you if you are using WordPress, which will allow you to include the given xd_receiver.html on your blog only when necessary, to reduce the front page size.

If you wrap the given code on the Disqus blog with the WordPress conditional tag is_single(), mentioned xd_receiver.html (and the javascript that its calling) will only included in your post pages, where the comment form should appear. See the code below;

<?php if (is_single()) { ?>
<script type="text/javascript">
var facebookXdReceiverPath='http://alikuru.com/wp-content/files/xd_receiver.html';
</script>
<?php } ?>

If you are allowing your visitors to comment on your WordPress pages too, you might want to change the is_single() with is_singular() ;)

Update: Disqus has launched an update and Facebook Connect caused messy statistics issue seem to reoccur. Here is another workaround.