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. Note: As of March 30, 2018, Google's URL shortener is only available to active users, and the data generated by those shortened URLs will only be available until March 2019. Undo Undo Shorten URL @ShortenURL 18 May 2011 More Revision 357: Removed: piurl.com, tr.im, kl.am; Added: min.ms, mrte.ch, v.gd; Thanks. This code looked something like the mumbo jumbo in the bolded text below (something about recording the outbound link, yada yada): facebook Of course, that was a huge pain for web developers everywhere, so Google created Google Tag Manager. Every web page or resource is specified by a unique URL, which means the internet consists of billions of URLs.
The disconnection of the server caused us serious problems, and to be honest, the level and nature of the abuse has become quite demoralizing. The way out is just the answer to the title of this post. A real-time dashboard with traffic analytics and referrer data shows how many people shared and clicked your links. bit.ly is a free service. Click this number in your report to open a list of subscribers who clicked. HootSuite ow.ly statistics shows different clicks on links shared through the management system.
For example: - campaign-level tracker {publisher_id} - campaign-level tracker with creative, but not adgroup data In this case, your data will be assigned to the campaign and tracker with an unknown adgroup. And since the original web address never changes, the URL seen in the address bar never changes either. • A third simple method if you don't have a website - requires only a domain name. The short URL can allow blacklisted URLs to be accessed, bypassing site blocks; this facilitates redirection of a user to blacklisted scam pages or pages containing malware or XSS attacks. You rely on this provider to keep your link viable into the future. The process must be fast, not handle clicks which have been deactivated by other processes and ensure links work even if the Analytics event fails. At that moment, internet users used the shortened URLs for newsgroup postings.
The disconnection of the server caused us serious problems, and to be honest, the level and nature of the abuse has become quite demoralizing. Google VS Bitly- URL Link Shorteners | 7 Key Differences Powerful Tools and Analytics Both Bitly and Google provide the analytical tools to see how well your shared link is doing online. See the company's blog to learn more about the changes that are taking place. More » TinyURL.com TinyURL used to be one of the top shortening choice in the past, and people still use it a lot today, however it does include a couple more characters compared to others like Bit.ly and Goo.gl. For example, the URL "" can be shortened to "", and the URL "" can be shortened to "". More » Mcaf.ee McAfee is a leading computer and web security company that provides antivirus, encryption, firewall, email security and much more to its customers. This is something you’ll often hear from link shortener detractors.
For example, "4" can be used for the "for" sound in a name. Browse our list for inspiration: You'll likely get some great ideas just look at what others have done! Another operational limitation of URL shortening services is that browsers do not resend POST bodies when a redirect is encountered. Put QR codes on products for our retail customers to scan. The second condition makes sure that we’re not capturing any relative links that typically looks like href="/some-url-path". Twitter will use this to make your timeline better. You can now return to the URL shortening service’s homepage at any time to view click stats for the link you posted to your Facebook wall. HootSuite also allows you to view a dashboard that tracks clicks for each shortened link shared in the management system. Adding tracking directly to your site If you have added the Analytics tracking code directly to your site, you can copy and paste the script below into your own pages to set up Event tracking for outbound links. Unfortunately, the data would be so inconsistent as to be unreliable. Sometimes a short URL is useful simply to give someone over a telephone conversation for a one-off access or file download, and no longer needed within a couple of minutes.