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. Twitter will use this to make your timeline better. Contents Purposes[edit] There are several reasons to use URL shortening. Complete Analytics Track each and every user who clicks a link. Thus, short URLs may be more convenient for websites or hard copy publications (e.g. a printed magazine or a book), the latter often requiring that very long strings be broken into multiple lines (as is the case with some e-mail software or internet forums) or truncated. In this case, the analytics are public, so you're giving it to everyone. The second reason is because this may or may not be a product with a future.
Let’s say the link is www.tech-recipes.com/2017/how-to-shorten-links-on-twitter-easily and it’s then shortened. Twitter even lets you schedule Tweets now ... sort of. Link farms were created and sold by shysters, and website owners fell for these deals and bought these links. With Bitly, you can track how many clicks your shortened links receive, plus bookmark and organize your links on your own personalized Bitly dashboard. In this case, each character in the sequence will be 0, 1, 2, ..., 9, a, b, c, ..., y, z. For example, New York Times uses the shortened address “nyti.ms”.
You need to be signed in to your bit.ly account before you can enter tracking data for the link. The general idea people have about Google Analytics is that it tells you how many vistors and pageviews you are getting, where the traffic is coming from, and what content is popular on your website. Registering a short URL[edit] Some websites create short links to make sharing links via instant messaging easier, and to make it cheaper to send them via SMS. This article is part of our HasOffers Basics series. Undo Undo Shorten URL @ShortenURL 20 Jun 2011 More Revision 362: * Updated toolbarbutton styles Thanks.
For example, if your source is "newsletter", the medium should not be "email newsletter". You'll also get detailed statistics for every link when you sign up for an account, and you're paid via PayPal for payouts as low as $5. More » Bit.do Bit.do is another great alternative that's both simple and powerful. It’s a good way to package up multiple links into one link. You can use up to one source parameter and five sub ID parameters, each of which appear in your stats and conversion reports. I have used Google Analytics, bitly, ConversionFly, and ClickMagick works the best for me.
However, Google Analytics can also provide you information about what users do when they come on your website, which banners or links they click the most, what product placements are working better on your website, which social media campaigns are bringing you more traffic, etc. Undo Undo Shorten URL @ShortenURL 24 Jun 2011 More Firefox Vision Statement Thanks.
Another consideration is that some countries also restrict what content can be used their TLDs, so if you intend in shortening content that might be in violation of these laws, you'll need to find another TLD. This plugin comes with tons of handy features especially to auto tweet and tweet directly from your WordPress post dashboard.
When this feature is used, links to your site that Sailthru includes in your email campaigns are wrapped in a redirect URL beginning with link.