And though it is unlikely that Bit.ly will be shut down, they are still a middleman. UA code is the unique identifier for each Analytics account you create.
You should use the one that’s right for your use case, but below is what I typically use on this site. Perhaps, you can try improving your ad and then do A/B testing.
While this solution might not compete with the extremely short URLs that link shortening services can provide (and without the equivalent analytics packages), it would avoid the link shortening middleman and let your user know at a glance where your link will take them. — Is link shortening for you? For example, New York Times uses the shortened address “nyti.ms”. Here are some guidelines: Campaign Name This field should contain some of the most specific information about what kind of email this is. This results in registration of different URL shorteners with a myriad of different countries, leaving no relation between the country where the domain has been registered and the URL shortener itself or the shortened links. This example assumes that you are using the analytics.js tracking code. Namely, I want to make sure that if have an absolute internal URL with www vs non-www that I capture both cases.
This is achieved by using a redirect which links to the web page that has a long URL. Google Analytics won't track redirects that don't contain embedded Google Analytics code. Such scripts avoid many issues with shortening services, keep the domain name as part of the shortened link, and can be made private.
For example, the URL "" can be shortened to "", and the URL "" can be shortened to "". On Twitter and some instant-messaging services, there is a limit to the number of characters a message can carry – however, Twitter now shortens links automatically using its own URL shortening service, so there is no need to use a separate URL shortening service just to shorten URLs in a tweet. Using it for spamming or illegal purposes is forbidden and any such use will result in the TinyURL being disabled and you may be reported to all ISPs involved and to the proper governmental agencies. Examples of this are rickrolling, redirecting to shock sites, or to affiliate websites. Of course, you could also just fetch and inspect the Location header in the response, but using the API has two advantages: It won't update the short URL's click stats, so you can fetch a bunch of long URLs without worrying about messing up analytics. Tap the address bar once to highlight all of the text contained within it. 3Adding dynamic data to redirects You can use a number of placeholders to inject data into redirect URLs, before they are forwarded to the user. Configure short link HTTP status codes for best SEO results. A link converted by Twitter’s link service is checked against a list of potentially dangerous sites. Another privacy problem is that many services' shortened URL format is small enough that it is vulnerable to brute-force search. Twitter.com: The truth is that the best URL shortener for Twitter is the one that’s built into Twitter.