You work hard to get your content shared and you deserve to be able to display your social proof appropriately. But what if you end up changing your permalink structure? Or what if you decide to make your site more secure by adding SSL (https)?
Well, in most cases, all your social share counts will disappear.
Since social networks are only tracking counts against a specific URL, if that permalink structure changes it’s effectively a “new” URL. This happens even if you’ve done a great job at creating proper 301 redirects.
So our team wanted to build a tool right into our social sharing plugin that would solve this problem and allow you to recover all your precious share counts and social proof.
Background Information: How it Works
In order to recover your social share counts, Social Warfare will make 2 requests to the various social networks. One request will use your current URL permalink structure, the other will use your previous URL permalink structure. Once the numbers have been fetched, if they are not an exact match, we will add the numbers together before displaying them on the buttons.
If the numbers are an exact match, the plugin assumes that that network is tracking the change and has already compensated accordingly. However, this only usually applies to HTTP to HTTPS or WWW to non-WWW (or vica versa). However, if a proper system of 301 redirects are in place, some networks can detect other changes as well.
Note: Our plugin will only fetch share counts for 2 patterns, the current structure and one previous structure. If you’ve changed more than once then you’ll need to pick the previous structure that you believe has the most shares.
In order to come up with that secondary, previous URL permalink structure, you’ll need to tell our plugin what that structure used to look like. You can follow the steps below to accomplish that.
Step 1: Navigate to the Share Recovery Settings
Inside your Social Warfare settings page, navigate to the Share Recovery tab.
Turn the feature to ON and proceed to the next step.
Step 2: Select previous URL format
Now, you have to tell Social Warfare which permalink structure you used to use. These options are a direct reflection of the options available to select from in the WordPress permalink settings.
Important: If your previous permalink structure has not changed then ensure that this is left on the “Unchanged” setting and proceed directly to the next step.
The options you have to choose from are as follows:
- Unchanged: For when your previous format on this setting is the same as your current format.
- Day and Name:
- Month and Name:
- Post Name:
- Custom: for when you have a previous format that doesn’t fit into the above structures.
Step 3: Select previous connection protocol
This step is only for those who have added or removed SSL/TLS and their site has gone from HTTP to HTTPS (or vice versa).
Important: If your HTTP/HTTPS structure has not changed then ensure that this is left on the “Unchanged” setting and proceed directly to the next step.
Choose the option that reflects what your previous version was (not what it currently is). So if your site was originally HTTP and is now HTTPS you would select HTTP from the list. Remember that you’re communicating to our plugin the link format that you used to use.
Step 4: Select previous domain prefix
If your site was (for example)
www.yourdomain.com and you’ve now changed it to only be
yourdomain.com (sans www.) then this option will allow you to recover shares with this type of change.
Important: If your previous domain prefix (www) structure has not changed then ensure that this is left on the “Unchanged” setting and proceed directly to the next step.
Simply select the previous iteration of your prefix from the list and Social Warfare will now check for those counts in addition to the current version counts.
Step 5: Enter your subdomain
If your site is currently on a subdomain (for example:
http://blog.yourdomain.com) but it wasn’t previously, you can enter your subdomain in this field and we’ll strip it out when we go to check for share counts.
Step 6: Use the debug tool to confirm correct pattern
If you want to double-check that your share recovery is set up properly, simply use our
?swp_cache=rebuild&swp_recovery_debug=true string on any post permalink to see what alternate permalink is being tracked.
So, for example you would check
http://yourdomain.com/post-name/?swp_cache=rebuild&swp_recovery_debug=true and see what URL shows up at the top of the article. If the URL showing is the one you want to be tracked, everything is working as it should.
You will need to keep share recovery activated for Social Warfare to continue adding the counts together. Actually, Social Warfare has a setting built in that won’t allow it to display counts if it fetches counts that are lower than it previously fetched. This is because every once in a while the API share count request fails and it ends up returning the number zero. However, if it fetches the number zero and it previously fetched the number 10, then we simply keep using the number 10.
With this in mind, here’s how it would turn out if you activate share recovery long enough to recover shares and then simply turn it back off:
- Activate share recovery function
- 10 (current URL) + 10 (former URL) = 20 shares
- Deactivate share recovery function
- Fetch 15 (current URL). Less than prev. Show 20
- Fetch 18 (current URL). Less than prev. Show 20
- Fetch 25 (current URL). More than prev. Show 25
- Activate custom recovery function
- Fetch 25 (current URL) + 10 (former URL). Show 35
So just make sure if you do use the share recovery function on your site that you remember to keep it turned on afterwards.
These settings should cover just about any possible scenario for permalink or URL changes to your Social Warfare enabled site. Please note that if you ever deactivate or remove Social Warfare from your site, your recovered counts will be lost. However, as long as Social Warfare is activated, your recovered counts are safe.
If you still have questions about how this function works, feel free to reach out to our Support team.