Not only is this good for link shortening, but it is also good for SEO. In April 2009, TinyURL was reported to be blocked in Saudi Arabia.[27] Yahoo! That redirect through our server is logged in your campaign report as a click. I could probably go on and on with a dozen more URL shorteners, but lets be honest, you only need one. However, standard analytics tools only do a great job in describing activities within the website without dealing too much with your links outside your website. Publish one custom branded short link on my business card, then keep the destination URL updated so that people are always taken to my latest blog post when they visit.
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. You can also right-click any highlighted section and choose Copy from the drop-down menu.
The custom tracking link page enables converting a regular custom tracking link to OneLink™. URL shorteners are nothing new, Tiny URL has been around for 100 years, but WP.me is different in a few ways.
Example for event tracking using the newer API: Previous Next
You may also like:
Cheap URL Shortener Design Online
URL Malware Removal
URL Shortener For Government