dont lose your likes 1200x700 2 Losing Your Social Sharing Counts Could Cost You

Losing Your Social Sharing Counts Could Cost You

It is common to overlook the social sharing counts on your pages when you’re moving from one domain to another or migrating to HTTPS, particularly on blog posts. Those little numbers beside the icons may seem trivial, but social proof remains a key indicator of reputability and quality.

Unfortunately, these buttons are hopelessly attached to the current page address in a near-literal way — they do not follow redirected URLs. And that means that after a migration the buttons will likely show no shares at all.

So how do you prevent this from happening? It’s easy-ish. You just have to tell the buttons where the original page was located so that the original share counts are brought forward.

You could do this manually, but many platforms — HubSpot and various WordPress themes and plugins included — automatically insert social buttons on posts and pages, leaving no opportunity to manually edit where they point to. And, anyway, it’s totally better if you automate this sort of stuff.


This is the third in a series of three articles that will explain how we managed to preserve our rankings in the wake of a site overhaul:


Automating the Updates to Your Social Sharing Counters

When we migrated our site to HTTPS, we created a small custom module in HubSpot that simply contained a checkbox. When ticked, it would indicate that the post was published prior to the HTTPS upgrade, and activate this JavaScript snippet:

This code simply swaps the https:// part of the canonical link for http:// and stores it in a new variable.

Moving from one domain to another? Here’s that snippet:

Simple, right?

Triggering that JavaScript can be done via checkbox, as we have it or if you wanted, you could automate it to run based on the date the post was published, so all posts published before a scheduled transition are automatically updated.

Then, you show the social buttons with the correct URL. Here’s what it looks like for our HubSpot site:

You’ll find similar code in your platform of choice, and it should be fairly easy for a web developer to modify it accordingly.

But it’s worth keeping in mind that preserving your social share counts is just one small step of many when building a new site. You need to make sure your content and sales funnels are deployed strategically, from your blog posts to deep-level marketing materials. Why not start by assessing your existing materials? Get started with a KAYAK Content Mapping Workshop today.

Similar Posts