AddThis Academy

An ever-growing library of resources to help you become a better online marketer.

Removing Hashtags, Anchors, and Tracking Codes from Your URLs

There’s been quite a bit of confusion about how to remove all of the hash tags/anchors/tracking codes from your URLs. This document should help you figure out exactly how to do it and, if they’re still showing up, what’s going wrong. First, we’ll explain what each one looks like and then we’ll talk about disabling them.

Click Tracking Codes

Click tracking codes are added after the share event and include an 11 character identifier and a service code separated by a period. Here are some examples:

  • #.F7dajfk324d.facebook
  • #.USvUZ935AHc.google
  • #.USvU9jbqfw9.twitter

Address Bar Tracking Codes

Address bar tracking codes are added to the URL in the address bar using JavaScript. They’re just 11 character identifiers without service codes. Here are some examples:

  • #.USvVcVpAQco
  • #.USvU7qUot5l
  • #.USvVqOjpYys

Disabling URL Tracking Codes

These codes can be disabled or enabled separately. This means if you disable one it will not automatically disable the other. To disable Click Tracking Codes, use this code:

<script type="text/javascript">
var addthis_config = addthis_config||{};
    addthis_config.data_track_clickback = false;
</script>

​To disable address bar tracking codes, use this:

<script type="text/javascript">
var addthis_config = addthis_config||{};
    addthis_config.data_track_addressbar = false;
</script>

​To disable both address bar and click tracking codes, combine the configurations like this:

​<script type="text/javascript">
var addthis_config = addthis_config||{};
    addthis_config.data_track_addressbar = false;
    addthis_config.data_track_clickback = false;
</script>

Overriding Your Configuration Values

A common mistake that people have is disabling these tracking codes at one part on the page and then re-enabling it further down. Please note that JavaScript executes from the top of the page down. So if you have the above code at the top of the page and this at the bottom:

​<script type="text/javascript">
var addthis_config = addthis_config||{};
    addthis_config.data_track_clickback = true;
</script>

​Click tracking will be re-enabled. To prevent this, put the code disabling click tracking as close to the </body> tag on your page as possible.

Removing Hashtags, Anchors, and Tracking Codes from Your URLs
4.5 (90%) 2 votes

Was this article helpful to you?