Hi @thecrazy1
As for statistics:
Currently we don’t have any statistics, I am sorry. But earlier one of our customers submitted a script that creates a basic statistic of the total linked accounts per provider:
If you would like to extend it with additional statistics, then we store the connection between the social media accounts and the WordPress accounts in this table:
e.g.:
and here it is the explanation of the database columns:
- social_users_id?– primary key of the social_users table, with auto-increment
- ID?– this is the User ID of the WordPress account that was linked to the social media account
- type?– identifies the provider the WordPress account has been linked to ( it says “google” if it is a link connected to Google)
- identifier?– the unique identifier within the social app ( e.g. the ID of a Google user ).
- register_date?– contains the date when the user registered with a certain provider. (If it is NULL then the user registered with either a traditional registration form or with another social provider )
- login_date?– the date the user logged in the last time with social login
- link_date?– the date when the user linked the social media account to the WordPress account
Based on these details, you could extend the statistics even further, however I need to mention that, you can not track e.g. the actual login count per user this way, as each time a login happens with social login, then we will update our data in the table. So e.g. if a user logs in with Google 10x a day, our database table will indicate only the last login date. If you want to track all login actions, then you need to log the the login meta data in some way, e.g. into a custom user meta, or into a dedicated database table. We offer multiple hooks for developers as you see in our developer documentation:
so you could run extra codes when we do certain kind of actions.
A note for the “click based” approach your mentioned above:
A simple click doesn’t really define an action, as a click on the social button could result in multiple outcomes such as:
- login
- registration
- linking to an existing WordPress account
- unlinking ( in case of the unlink state of the button, that we display for logged in users )
- nothing ( e.g. the user cancels the authentication by closing the popup )
so you should focus rather on the result of the action.
Best regards,
Laszlo.