Mobile app version of vmapp.org
Login or Join
Odierno851

: Preserving social metrics when switching to https I am switching all my sites to https this week and am running into an issue. We use AddThis for our sharing widgets and according to their

@Odierno851

Posted in: #Google #Https #SocialMedia

I am switching all my sites to https this week and am running into an issue. We use AddThis for our sharing widgets and according to their support all our social metrics will be reset to zero once the switch happens and they have no work round. We have 1000's of likes and shares on many pages and I really do not want to lose those metrics.

Are there any other techniques I can try to preserve the share/like counts? All sites run on WordPress.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Odierno851

1 Comments

Sorted by latest first Latest Oldest Best

 

@LarsenBagley505

The buttons are attached to the original URL and will not follow redirects. However, my understanding is that this is possible, that is - so save your shares.

For posts created prior to the SSL upgrade:



function buttons(){
var kCanonical = document.querySelector("link[rel='canonical']").href;
window.kCompositeSlug = kCanonical.replace('https://','http://');
return;
}
buttons();


The above code changes the part of the canonical link for and stores it in a new variable.

What if you are completely changing your domain name? Then try this:



function buttons(){
var kCanonical = document.querySelector("link[rel='canonical']").href;
window.kCompositeSlug = kCanonical.replace('https://newdomain.com','https://olddomain.com');
return;
}
buttons();


Triggering that javascript can be automated to run based on the date the post was published, so all posts published before a scheduled transition are automatically updated, see below:


{% if widget.oldPost %}




Tweet


document.write('</script>');


document.write('');


document.write('');




{% else %}




Tweet












{% endif %}


The above was made to be used within Hubspot, but it should be easy for a developer to chime in & help modify.

For wordpress, try a plugin called Warefare - I cannot attest to the validity of this, and it will cost you as it's a subscription-based service.

This page from addthis academy could also be useful.

I've also been told that support will help you preserve your shares as well, do try reaching out to them.

Best of luck!

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme