Once Twitter (and other social media) took off and introduced the 140-character limit, that shortened link became even more important. Tracking Out-going Links with Google Analytics With Google Analytics, you can also track outbound links on your website.
There are a lot of options for shortening your links, and some even provide additional services like link bookmarking and analytics on your clicks. Undo Undo Shorten URL Retweeted TechCrunchVerified account @TechCrunch 17 May 2011 More Amazon Buys The A.
The real benefit of using this link shortener comes with using it in conjunction with HootSuite itself for all your social media marketing. It's one of the most widely used options out there, and you'll often find it integrated with lots of other services as well as third party apps like TweetDeck and TwitterFeed. This example assumes that you are using the analytics.js tracking code. Twitter will use this to make your timeline better.
To begin, you should read the section on Authentication. These are all exposed in the
using rel=shortlink. Twitter will use this to make your timeline better. The website is just as basic it was when it launched, but it does the deed. I like Bitly because it has a pretty interface and a login for all of the links you create.
The short URL can allow blacklisted URLs to be accessed, bypassing site blocks; this facilitates redirection of a user to blacklisted scam pages or pages containing malware or XSS attacks. This can be added to existing JavaScript files or in a script block as long as it’s loaded somewhere within the HTML body (ideally, just before the closing tag). jQuery (or your alternative) must be loaded first although the Google Analytics tracking code can appear anywhere on the page. /* Track outbound links in Google Analytics */ (function($) { "use strict"; // current page host var baseURI = window.location.host; // click event on body $("body").on("click", function(e) { // abandon if link already aborted or analytics is not available if (e.isDefaultPrevented() || typeof ga !== "function") return; // abandon if no active link or link within domain var link = $(e.target).closest("a"); if (link.length != 1 || baseURI == link[0].host) return; // cancel event and record outbound link e.preventDefault(); var href = link[0].href; ga('send', { 'hitType': 'event', 'eventCategory': 'outbound', 'eventAction': 'link', 'eventLabel': href, 'hitCallback': loadPage }); // redirect after one second if recording takes too long setTimeout(loadPage, 1000); // redirect to outbound page function loadPage() { document.location = href; } }); })(jQuery); // pass another library here if required The event is recorded with the category name ‘outbound’, action name ‘link’ and the value set to the URL of the outbound page.
Shortening links for Twitter simply means reducing its length and at the same time, it still works correctly. Libya, for instance, exercised its control over the .ly domain in October 2010 to shut down vb.ly for violating Libyan pornography laws.
Note: The XSS Antisamy configuration is now in SLING under path /libs/sling/xss.config.xml and the following rules need to be added to for ad-hoc linking to work: Anchor tag rule extension