Some shortening services, such as goo.gl, tinyurl.com, and bit.ly can generate URLs that are human-readable, although the resulting strings are longer than those generated by a length-optimized service. 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.
To enable SSL for your link domain Identify your link domain. Is there more than one type of Google Analytics tracking on your links? If you combine MailChimp's Google Analytics tracking with custom UTM tracking, this could skew results in reports. Twitter will use this to make your timeline better.
The links toolbar may not be visible in all setups and in most browsers, you can enable it in the View->Toolbars menu of your web browser. For example, .in, the TLD for India, is good for names ending in the "en" or "in" sound. .es, Spain's TLD, is good for plural names ending in "-es". The macro below will allow you to grab just the hostname from the outbound URL.
In general, don't remove vowels at the beginning of words, though. You can use up to one source parameter and five sub ID parameters, each of which appear in your stats and conversion reports. Add Tracking to Email Campaign Archives and Pages To add Google Analytics tracking to your email campaign archives and pages, follow these steps. Generate Tiny URL To shorten URLs and hide publisher tracking information, check the Generate Tiny URL box. The reason for this is because cookies cannot be set cross-domain, and pageviews, interest data and campaign-specific purchase attribution would not function.
Your fully customized, network specific tracker URL will then appear for both clicks and impressions. It depends on the amount of point of interest you need to track. Launch and use Now that you're all set up, you're ready to use your new URL shortener. If the shorthand link is found to be associated with a URL, the URL is fetched, otherwise an error message is returned.[7] The patent was filed in September 2000; while the patent was issued in 2005, US patent applications are made public within 18 months of filing. When URLs are requested, a web script begins with a template and fills in details by fetching information from a database. You can even make each link in the list a tny.im short link, for enhanced statistics! Undo Undo URL Shortener @URL_Shorteners_ 28 Dec 2012 More Thanks.