Which wpDiscuz social providers are my commenters using for 'social login'?

PUBLISHED 15 May 2023 - UPDATED 15 Aug 2023

If you use the WordPress comment plugin wpDiscuz for 'social login', here's how to see which social providers are the most popular among your users.

Introducing wpDiscuz social login

Several comment plugins are available for self-hosted WordPress sites, and wpDiscuz is among the most popular. One of its free features is 'social login', which enables your users to log in and comment using a selection of third party social providers, including Twitter, Facebook and Google. Among other benefits, this pulls through the user's image or avatar from their account with that provider.

As site owner, you can choose which providers to offer. This can be configured in the WordPress dashboard, wpDiscuz > Settings, 'Social Login and Share'.

Having enabled social login, it would then be useful to see which of the social providers are being used the most. For example, if you are offering Telegram as a login option, but none of your users are making use of it, perhaps you would be better off removing it.

But the wpDiscuz plugin itself doesn't offer any data on usage. So how can we find this out?

Check your user accounts

When a user uses wpDiscuz social login for the first time, a 'subscriber' account is created for them on your site. So you can go to Users > All Users in your WordPress admin dashboard to see all of your social login users.

However, if you give users a different way to create an account on your site, you won't be able to differentiate between those users and your social login users. Also, looking at your list of users doesn't tell you which social login they chose to use. So this approach is only of limited use.

Look at your database

Instead, you can get the information you need from your WordPress database. To do this, you'll need a utility called phpMyAdmin, which should be available as part of your hosting dashboard. In my previous post I wrote instructions on accessing phpMyAdmin and selecting the correct database for your site, so I won't repeat them here.

Once you are in phpMyAdmin and have chosen the correct database, click on the table called wp_usermeta. This contains all the metadata about your users, including three pieces of information that are added by the wpDiscuz plugin:

  • wpdiscuz_social_provider
  • wpdiscuz_social_userid
  • wpdiscuz_social_avatar

You'll find all of these in the meta_key column, with the corresponding value in the meta_value column:

wpDiscuz meta

Any user who has never used social login will not have these keys or values at all.

Assuming your wp_usermeta table is quite small, there's an easy way to gauge your users' usage of social logins.

  1. Click on the wp_usermeta table (you may have already done this if you are following along)
  2. Click on the Show all button above the column headers

Show All tickbox in phpMyAdmin

  1. You will see a warning asking you to 'Confirm' - click OK
  2. In the 'Filter rows' search box, enter wpdiscuz_social_provider

Filter rows in phpMyAdmin

You will now see one row for each user that has used wpDiscuz social login, along with their user ID and (in the meta_value column) the social provider they chose. This lets you quickly tot up the number of users both for each provider and in total:

Meta_key and meta_value in phpMyAdmin

Query your database

Of course, if you have a large number of users this won't be practical - and choosing 'show all' may even crash your browser. Instead we can run a SQL query to get us the information we need.

  1. Still In phpMyAdmin, click on SQL in the top menu
  2. In the empty box at the top, paste in the following code:

  1. Click Go (button on the right)

This query will return the number of rows (users) for each social provider. The results will look something like this:

Meta value SQL count

So looking at that example, I can see that Google is by far the most popular social provider on the site! But Facebook and Twitter are also getting some usage. I can use this information to make decisions about the providers I do or don't offer. And now you can do the same.

Subscribe
Notify of
guest
1 Comment
Oldest
Newest
Inline Feedbacks
View all comments
lucy
lucy
4 months ago

The process of setting up the Facebook login option is a bit hard though

James Clark
Hi! I'm James Clark and I'm a freelance web analyst from the UK. I'm here to help with your analytics, ad operations, and SEO issues.
1
0
What do you think? Leave a commentx
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram