A script to count number of blog subscribers correctly

Reporting the correct number of subscribers is sometimes tricky. This post describes how Jetpack currently counts number of subscribers for self-hosted WordPress blogs.
How do we have 2685 subscribers in our blog? I don’t have any idea. I have been struggling for the past two days to reduce this number. You are probably thinking I have gone crazy. Instead of writing an awesome post on how I got more blog subscribers, I am talking about how I should bring this number down. The subscriber-count of our blog became 2,685 from seven hundred something in one day. Shouldn’t I be alarmed?

Why am I trying to bring the subscriber-count down?

I am trying to bring the subscriber-count down because the number is not correct. So far, our blog has 37 user subscribers, 63 email subscribers, and 620 WordPress followers. The total should be 37+63+620=720. I do not have any clue why the total number is 2,685 in the sidebar. In one fine morning, I noticed that the number has increased drastically. I have no clue what happened.

How do I get my subscriber count?

One direct way to obtain the subscriber-count is by using the widget Blog Subscription (Jetpack) after connecting a self-hosted WordPress site to WordPress.com via the Jetpack plugin. A problem is — the Blog Subscription (Jetpack) widget will only give you the number of your WordPress followers.

To include my email subscribers and subscribers with login, I use a PHP code that adds the additional subscriber-counts with the Jetpack provided WordPress follower-count. My PHP code is provided below. I found the code on the Internet. I just changed a thing or two.

<?php


$result = count_users();
$subs_count = get_transient('wpcom_subscribers_total');

if (FALSE === $subs_count || 'failed' == $subs_count['status']) {
	Jetpack:: load_xml_rpc_client();
	
	$xml = new Jetpack_IXR_Client(array('user_id' => JETPACK_MASTER_USER,));
	
	$xml->query('jetpack.fetchSubscriberCount');
	
	if ($xml->isError()) { // error
		$subs_count = array(
		'status' => 'failed',
		'code' => $xml->getErrorCode(),
		'message' => $xml->getErrorMessage(),
		'value'=>(isset($subs_count['value']))?$subs_count['value'] : 0,
		);
	} else {
	$subs_count = array(
	'status' => 'success',
	'value' => $xml->getResponse(),
	);
}

set_transient('wpcom_subscribers_total', $subs_count, 3600); // cache
}

$active_subscribers = es_cls_dbquery::es_active_subscribers();

echo "Join " . ($active_subscribers+$result['total_users']+$subs_count[value]) . " subscribers.";

?>

This is giving me the message — Join 2685 subscribers.

To the best of my understanding, $active_subscribers gives the count of email subscribers. $result['total_users'] provides the number of subscribed users. Finally, $subs_count[value] is supposed to give me the number of WordPress followers. $subs_count[value] is the part that is coming from WordPress.com via Jetpack. Unfortunately, this number is incorrect. Even Blog Subscription (Jetpack) widget from Jetpack is giving me this large value instead of anything closer to 720.

My conclusion

I think Jetpack is doing this mistake. Probably something updated automatically in the past few days. Maybe after the update, the code is not doing what it is supposed to do. I do not know. WordPress.com is showing me that I have 620 WordPress followers, whereas Jetpack is reading the number as 2585. Added with my email and account subscribers the total is showing up as 2685, where it is supposed to be 720.

What will I do now?

I will study more to see if I can see the bottom (or top) of it. Meantime, you know that our subscriber-count is not that large (I wish it was). It is actually 720, as of today (August 19).

Please let me know if you have a clue.

Settle in El Paso team

Update (August 22):

I wrote to WordPress.com first. They instantly responded that it is not their headache because our blog is a self-hosted WordPress website. They suggested I contact the WordPress.org Support.

I wrote to wordpress.org and they provided me with surprising information. As of August 18, 2018, Jetpack includes social followers — Twitter, Facebook, Google+, and any social media Publicized/connected via Jet pack — in the subscriber count. This is the reason why I have this jump of subscribers. Well … that explains a lot. Here is the conversation I had with a WordPress.org moderator: Link.

I got my answer! Hurrah … my phantom subscribers are real! 🙂



Subscribe to receive our newsletters and notifications on new posts. Your email address is safe with us. It will not be distributed to any third-party.
Loading



Comments

78 thoughts on “A script to count number of blog subscribers correctly

  1. I believe it could just be a bug. Or probably just late update of numbers of your subscribers. At least, it’s not about diminishing numbers of subscribers but increasing. Congrats! Keep up the good work.

  2. Hmmnn. I have a question! If that really is the case, would that phenomenon raise some problems for you and your blog in the future?! If yes, what kind of problems would that might be?! Thanks in advance for answering my query 🙂

  3. Wow! I wish I could have that kinda number on my youtube account. It is very hard to invite someone or convince people to follow your blogs /subscribe because most of them are more on reality and entertainment. Though the topic is very useful and informative to others, but subscribers are looking for some kind of excitement and pleasures nowadays. If you have 720 subs already , it explains that you are effective and followers are very interested on your various topics. Two thumbs up for you man! Keep it up.

  4. Wow! This is real! Thank you for this information. It really works!

  5. Its important to reach more people so somehow i understand why you do that. It is just simply getting more famous now 🙂

  6. Before I don’t understand people who always ask to subscribe to their channel or like their post but now I believe that it’s really going to help you a lot if you’re an online freelancer. If you’re in affiliate marketing or you want to advertise a product, you don’t need to worry about getting a traffic for your blog. You can easily spread your advertisement and you’re sure that they’ll take notice of it.

  7. So if you connect your self-hosted WordPress site with wordpress.com through Jet Pack, it will count your social media followers also as the followers of your blog. This is a new information. I have less than 100 followers on my blog, however, I have 6.5 followers on Twitter. If I connect my site with my wordpress account via jet pack, my total followers will be too big.

    1. Yes, that is what it is going to be in a follower count widget from now — the total of connected social media, and WordPress followers.

  8. I don’t know how 2685 subscribers appeared if you say you have only 720 subscribers in real time. What defines this number is your work, dedication, and talent to write. When people find a blog that is written well and have interesting posts they become loyal visitors and they may bring other people to subscribe to your blog.
    So, I think you should feel proud to see that your work is appreciated and loved by many!

    1. Haha … I appreciate the kind words you have written on this post. Thank you so much for all your comments and regular visits on this blog. Have a wonderful evening.

    2. Yes, she does a great job. The posts contain very clear and informative illustrations, something likely to attract loyal visitors to the site.

  9. Great job for increasing your subscribers! I do also want to start my own blog but struggle to find what niche should i go with and i even think of Vlogging instead of blogging. What do you think is much better than the two? i love to tell stuffs about mysteries and the unknown but a bit skeptic on what will happen. Any way your numbers are not stopping to get higher and i congratulate you on that!

    1. Both are great ?. For mysteries, blogging sounds more interesting but vlogging can be more unique. Please share the link when you have the blog or the channel or both.

      Thank you for the kind words, visiting, and commenting.

  10. Great post!! I was very intrigued from the first sentence. I have just recently started a new WordPress blog and am unsure about Jetpack. I must admit the progression on my blog is coming along rather slowly, however you have definitely boosted my confidence on using Jetpack! I am trying to learn how to design my blog myself this go around. I found it very useful that you included the php code, and how you located it. I was unaware that you could find them online and just copy and paste them to your blog! I have always heard, “You learn something new Everyday!” I have definitely learned some very helpful and useful information today! Keep up the great blogging!

    Do you have a favorite website where you find php code?

    1. Thank you very much for visiting, commenting, and the kind words.

      This particular code, as far I can recall, is a part of a public plugin and the source-code is somewhere on the internet. It could be even a part of Jetpack. I have forgotten the exact location. Sorry about that. I just modified one or two lines of the code to display the numbers.

      I do not have any favorite place to search for php codes. I search with a problem. Codes may appear in the search result, or not, as a solution.

      Thanks again. Have a wonderful day.

  11. I can’t help but laugh right now. Don’t know if it’s your humor or style of writing, I just have to say this: I enjoy every piece I read on this blog. I love the way you introduce a product and the talk about reducing your no subscribers. I don’t think I’ve come across anyone wanting to reduce their no followers. It’s quiet unusual as everyone is needing to increase following on social media.

    Jetpack is an awesome tool, I don’t use it but I know a few who does. Your problem is probably coming from WordPress. Go over the checks again.

  12. I would just like to congratulate you on your subscriber numbers. Whether they are at 720 or over 2,000, the numbers are impressive and something to be proud of. Your hard work and attention to detail have paid off. The way your posts are constructed shows that you are thinking about what is visually appealing and computer screen layout compatible. The posts are easy to understand and navigate, and have an eye catching quality that makes you want to look at them. It is no mistake or accident that you have so many subscribers.

  13. I’m not sure about blogs, but a forum can gain a lot of members who could care less about your forum. Instead, they’re simply signing up for a profile link. In that case, I’d rather have them gone, even if their presence means larger numbers – because ultimately, it’s fake.

  14. I was just about to suggest you go to WordPress.org.. but then read the update. 🙂 It’s always good to know everything’s doing just fine, really. Congrats! (By the way) >-I

    1. Thank you for thinking about suggesting WordPress.org and for congratulating. I appreciate your visit and comment. Have a wonderful day.

Leave a Reply

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

CommentLuv badge

Facebook Comments