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. Scott Hanselman wrote a short but interesting post tracing the amount of redirection that happened on a single shortened link.
Short URLs, for example, will be subject to linkrot if the shortening service stops working; all URLs related to the service will become broken. The permalinks you use in WordPress can be ideally created to be as short as possible. Organize all my important digital resources with easy to remember, keyword-rich short links. Undo Undo Shorten URL @ShortenURL 15 May 2011 More Statistics for Sunday, May 15, 2011 Thanks.
Tracking Links to your PDF Using Open Site Explorer you can take the full URL of your PDF and drop it directly into the search bar and click search. It's only one of the most popular social media management tools currently out there! This is a nice extra feature if branding is important to you or if you want to make your link easier to memorize. This point was underscored a few days ago when a popular one, tr.im, announced they were going to shut down at the end of the year.
UA code is the unique identifier for each Analytics account you create. 4 {{ upvoteCount | shortNum }} SeymourJones in Web Design Let me start by saying, this sounds "crazy". Adjust can automatically detect the platform of a user upon the initial click and dynamically send that user to the correct App Store. What Link Shorteners Do (And Don’t Do) Link shorteners were originally created to address stubborn email systems that wrapped an email after 80 characters and broke any long URLs that might have been in the message. Personally, I use Hootsuite for all of my Twitter’ing so I don’t have the need to go out and shorten it separately. Macro Name: element url hostname Macro Type: Custom Javascript Custom Javascript: Caveats If you have a Google Analytics Premium account, note that this will increase the # of events for you site.
My third choice, which was once my first choice, is Bitly. ClickMeter is used by several thousand of happy affiliates and work with hundreds of affiliate programs. When you schedule a link Tweet via Hootsuite, you can shorten the link to an owl.ly link. owl.ly/0a0b0c0 Google: As always, Google has something for you too. The nice thing about it is that it’s a short link, about 70% smaller than the permalink for this post. Brand the client's links to increase engagement and inspire audience trust. A conversation through the use of headers will take place between your computer and the tiny.cc server. Just keep in mind that there are a couple more characters in this option as compared to others like Bit.ly, Goo.gl and Ow.ly, so it's not exactly the shortest URL shortener.I haven’t heard of any account getting banned for using a URL shortener, so you should be in the clear to use any URL shortener of your choice. Create smart link targets to automatically route visitors by language or operating system so that we end up with engaged customers instead of bounces. In this article, you’ll learn how to add Google Analytics tracking to your email campaigns, archives, and list pages. When you compare top-level trackers, the behavior of your Network-X-driven users is compared to users from organic growth or from other networks. The solution… We’ll attach a click event handler to the body element. From Google Event Tracking Guide Event Tracking is a method available in the ga.js tracking code that you can use to record user interaction with website elements, such as a Flash-driven menu system. Keyword This field should never be used in an email campaign. It will track the links, but you will still need to use the 'Link Tracker' utility provided by smallseotools.com to examine the links and verify them. Orientation: How you decide to design your site's layout may be influenced by whether your users view your site primarily in landscape or portrait mode. There are other methods of redirecting, but a 301 is the best choice if you are concerned about SEO.