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. I’ll use jQuery 1.x for this example since most sites use it but you can substitute a lightweight option such as min.js, Zepto.js, Minified.js or your own event handling functions.
Bitly offers all sorts of tracking stats about your URLs, including the number of clicks, the origins of those clicks, and the referring sites. Once implemented, visit your site and click a few outbound links. Verify that none of your live events are using Eventbrite’s classic “Google Analytics” tool. 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.
Here are just a few that seem to be popular: Bitly: TinyURL.com: Goo.gl: To find more options, just type “url shortening” or “url shortening services” into your favorite search engine. If you are permitting other websites to create links to your site, then you need to monitor the links to your site. To quote John Wanamaker, the father of modern advertising: So which half of your advertising is a waste of money? Creating a shortened page slug is simple in WordPress. And if I was using Twitter.com to Tweet as I sometimes do, then I wouldn’t use one, I’d just let Twitter shorten it. As an example, their tracking system could have a macro for ad placement that you use to replace "AFF_SUB", and another macro for traffic source that you use to replace "SOURCE".
The real benefit of using this link shortener comes with using it in conjunction with HootSuite itself for all your social media marketing. In this case you definitely want to use Bitly‘s customize feature, in which you can add a name or tag to a shortened URL to make it more recognizable. Once you are sure that your WordPress site does not have Google Analytics code, go to Settings » Google Analytics. It is a legitimate concern that many existing URL shortening services may not have a sustainable business model in the long term.[12] In late 2009, the Internet Archive started the "301 Works" projects,[25] together with twenty collaborating companies (initially), whose short URLs will be preserved by the project.[12] The URL shortening service ur1.ca provides its entire database as a file download, so if its website stops working, other websites may be able to provide ways to correct broken links to URLs shortened with its service. Twitter will use this to make your timeline better.
Check out our review of this fantastic tool to see how it works. Understand which one of my marketing channels or Ads are most effective and optimize digital Ad spend. Twitter will use this to make your timeline better. Organize all my important digital resources with easy to remember, keyword-rich short links. From there, you can click Export as CSV to download a list of contacts for each link result. And static URLs are typically ranked better in search engine results while dyanmic URLs tend to not get indexed. It's one of the most widely used options out there, and you'll often find it integrated with lots of other services as well as third party apps like TweetDeck and TwitterFeed. But, as Matt Cutts says in this video, the page rank and anchor text will flow through the shortened link and that there shouldn’t be any harm in using them…as long as the URL shortener is using a 301 redirect. An Enterprise edition supports multiple domains, advanced dashboard features and a customer service support plan.Itʼs possible that these automated requests were sent from another user on your network. Shortened links allow you to share long URLs in a Tweet while maintaining the maximum number of characters for your message.