Rich media developer's guide

Use pound sign or hash mark in click-through

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:


IE or Safari shows the destination as:

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.

This problem occurs only with Iframe/JavaScript tags, JavaScript tags, and static click tracker tags, not with standard tags or dynamic click tracker tags.

The following are suggested workarounds for including a # in the click-through URL.

You should receive a warning if the # 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, 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:


Depending on the site, the escaped URL might not work correctly.

If exit URLs are pulled using XML files or are embedded directly in the creative code, revise the exits in the XML file or code to avoid using the # character. Or, adjust them using one of the workarounds listed above.
Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

Clear search
Close search
Google apps
Main menu
Search Help Center