There are several ways to use a hash mark or pound sign (#
) in a click-through URL. But first, some background.
In a URL, a hash mark, number sign, or pound sign (#
) points a browser to a specific spot in a page or website. It is used to separate the URI of an object from a fragment identifier.
When you use a URL with a #
, it doesn't always go to the correct part of the page or website. Sometimes Internet Explorer has problems with the #
in URLs when tracking clicks on them. If you use %c
to track clicks on URLs that include a #
sign, Internet Explorer might not display the #
and the fragment identifier in the URL.
For example, if the following is clicked:
%chttp://www.click-through-url.com/#section2
IE or Safari shows the destination as:
http://www.click-through-url.com
Depending on the site, content might not be displayed correctly because the #
and fragment identifier are missing.
While our ad server doesn't remove the #
and fragment identifier, some browsers don't pass that information when you use a click tracker or %c
to track clicks. As a result, the #
and fragment identifier are missing.
The following are suggested workarounds for including a #
in the click-through URL.
#
character is used in the click-through URL field, but the suggestions below are for successful use of the #
in a click-through URL.Workaround 1: Create a vanity URL that redirects to the click-through URL. For example, http://goo.gl accepts a URL and provides a short URL to be used as the click-through URL.
Workaround 2: Fully escape the string explicitly, where # = %23. This may be different from what the JavaScript encode()
call does. For example:
http%3A%2F%2Fwww%2Eclickthroughurl%2Ecom%2F%23section2
Depending on the site, the escaped URL might not work correctly.