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. Notes: Your custom URL can have 5-30 letters or numbers.
But if all the links to you use a shorter version, that sort of defeats the point! A few well-known websites have set up their own URL shortening services for their own use – for example, Twitter with t.co, and Google with goo.gl. Top-level domains of countries such as Libya (.ly), Samoa (.ws), Mongolia (.mn), Malaysia (.my) and Liechtenstein (.li) have been used as well as many others.
Buffer: If you currently use Buffer or manage your social media channels this is a great platform. If you aren't logged into your HasOffers account, HasOffers will treat the click as legitimate traffic. The customized bit.ly version allows you to use your own domain name for branded short links which can be easily shared on Twitter, Facebook or other social media sites.
Another privacy problem is that many services' shortened URL format is small enough that it is vulnerable to brute-force search. WP.me is the only two-letter .me domain in the world. You cant just go there and type how your day went and expect Twitter to accept that. Check Validation: Also optional, but this just makes sure the user “really” clicked on the link. We wanted to see: A) How many page views the PDFs were getting B) How long people were staying on these PDFs C) How prone they were to bouncing (just in case we needed to redesign them) D) The links we were getting to the PDFs E) Where those links were coming from The solution was pretty simple. This is it. tinyurl.com/0a0b0c0 Buffer: In order to shorten your URLs, you need to schedule your posts through Buffer who will put your posts in a queue and schedule them to go out at the times you preset.
This automatic behavior provides the best possible experience to your app users who open goo.gl links, no matter what platform or device they are on. For example, if you send out weekly newsletters, this might be "newsletter". It will show domains as you type as well as indicate which ones are available. What's more, distributed bunches of substance in different way. These are all exposed in the
using rel=shortlink. So if you have a page at , you can use the URL and going to this URL will forward the visitor to the page in your website.