惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Vercel News
Vercel News
博客园 - 【当耐特】
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
G
Google Developers Blog
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
P
Proofpoint News Feed
J
Java Code Geeks
U
Unit 42
云风的 BLOG
云风的 BLOG
阮一峰的网络日志
阮一峰的网络日志
N
Netflix TechBlog - Medium
宝玉的分享
宝玉的分享
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
D
Docker
V
Visual Studio Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Help Net Security
V
V2EX
T
Tailwind CSS Blog

AddToAny Blog

Threads share button Replace AddThis with AddToAny, the AddThis alternative
Get back your share counts after a move to HTTPS or a URL...
2018-08-06 · via AddToAny Blog

August 6th, 2018

AddToAny Share Count Recovery is a free & mighty feature for publishers using share counters.

You can recover lost share counts when moving to HTTPS, a new domain name, or a new URL structure. A previous URL’s share counts are simply added to the current URL’s share counts, so you won’t lose your new counts.

AddToAny Share Count Recovery

HTTPS + HTTP

As websites transition from plain HTTP to encrypted HTTPS, publishers are finding that share counts — especially Facebook Likes — reset to zero. This is because Facebook considers http://example.com/ and https://example.com/ to be completely different URLs.

Facebook offers technical guidance on how developers can redirect URLs and exempt their crawler from redirects to retain share counts. This is doable for some developers and WebOps teams, but the Facebook crawler exemption can be difficult to setup, awkward to maintain, and it still doesn’t cover Pinterest and Reddit.

With AddToAny share count recovery, it’s just one line to combine counts for the HTTP and HTTPS versions of shared URLs.

HTTP recovery applies to Facebook, Pinterest, and Reddit. Some services — such as Tumblr — are ‘protocol neutral’ with shared URLs, meaning they consider http://example.com/ to be the same as https://example.com/. So if you’re only recovering HTTP counts, AddToAny skips the extra lookup for unaffected services such as Tumblr.

New domain + Old domain

Whether you’ve switched to a new domain name or a new subdomain, AddToAny has your domain recovery needs covered too.

Just place your old domain name in a line of code as demonstrated in the share count recovery docs.

New path + Old path (and other URL changes)

For more complex changes, AddToAny lets you script out your own recovery logic within a custom JavaScript function. A helpful data object is passed to your custom recovery function, making it convenient to reconstruct an old URL structure based on parts of the shared URL, such as the domain, protocol, and pathname parts. You can also get values from any HTML data-* attributes you may have provided, such as a post ID, day, month, or year.

Recover share counts with AddToAny

See the WordPress, Drupal, and HTML guides for how to use share count recovery to get your share counts back.