How to configure addthis so that it won't create the hash data in the URL that I am going to share?
Asked Answered
C

3

5

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!

Cella answered 2/8, 2013 at 5:5 Comment(0)
U
7

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.

Urbane answered 11/10, 2013 at 22:34 Comment(2)
I had exactly the same problem and you are correct: data_track_clickback is what's required on this case. AddThis documentation is not clear about this and the two options have similar names: data_track_clickback and data_track_addressbar.Pipes
Excellent. AddThis' documentation isn't fantastic, so thanks for providing this. Also, this is the real answer, OP.Lucialucian
S
1

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 -->
Sayed answered 2/8, 2013 at 5:9 Comment(9)
yup it is. Did you try this code. You have to load the widget <script src=..." AFTER you write this line. Have you done that? i.e this needs to be something like var addthis_config = { pubid: "YOUR-PROFILE-ID", data_track_addressbar:false }Sayed
yes I did. nothing has changed. I even have turned off the tracking in my addthis account and it goes no where! take a look in my edit. thanks.Cella
no i mean the other way around. i.e Move Addthis widget call after the line of code. See my edit in the answerSayed
damn! can i have a link to your page? it might be easier to diagnoseSayed
k last thing try removing var before addthis_config addthis_config = { pubid: "YOUR-PROFILE-ID", data_track_addressbar:false }Sayed
also remove the first addthis_configSayed
I just did but... i'm giving up! take a look at the same link above please.Cella
s7.addthis.com/js/250/… see if it works. Otherwise, i am out of ideasSayed
no worries. addthis team should look into this! thanks for help!Cella
B
1

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

Burgher answered 9/9, 2014 at 9:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.