When I share a page, addthis creates some data/ infomation after my share URL with a hash(#) - how I can configure addthis so that it won't create the hash data in the URL that I am going to share?
For instance, addthis makes these,
http://mywebsite.com/#.Ufs8RtZRjpU.facebook
http://mywebsite.com/#.Ufs8oc2zPtQ.twitter
I am after,
http://mywebsite.com/
http://mywebsite.com/
Is it possible?
edit:
<!-- AddThis Button BEGIN -->
<script type="text/javascript">var addthis_config = { pubid: "lauthiamkok", data_track_addressbar:false };</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=lauthiamkok"></script>
<!-- AddThis Button END -->
<script type="text/javascript">
var addthis_config = addthis_config||{};
addthis_config.data_track_addressbar = false;
</script>
Tried this but does not work. Addthis is still a pain after years using it!
I think what you're wanting to disable is clickback tracking, and in your question you're trying to disable address bar tracking. Try this instead:
var addthis_config = {
data_track_clickback: false
}
Found this here.
I found this: http://support.addthis.com/customer/portal/questions/352733-how-to-remove-hash-from-url-
<script type="text/javascript">
var addthis_config = addthis_config||{};
addthis_config.data_track_addressbar = false;
</script>
Okay try moving the add_config line above the widget
<script type="text/javascript">
var addthis_config = addthis_config||{};
addthis_config.data_track_addressbar = false;
</script>
<!-- AddThis Button BEGIN -->
<script type="text/javascript">var addthis_config = { pubid: "lauthiamkok", data_track_addressbar:false };</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=lauthiamkok"></script>
<!-- AddThis Button END -->
I have created a JavaScript function and used it on load....
function onloader() {
var v = window.location.href;
v = v.replace(/\#.*/, '');
window.location.href.replace = v;
}
$(window).load(function () {
onloader();
});
that did work for me... :) hope that will work for every one :D
来源:https://stackoverflow.com/questions/18009131/how-to-configure-addthis-so-that-it-wont-create-the-hash-data-in-the-url-that-i