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. But when creating links in html you can't get away with dropping the protocol.
It’s a pain, but the outbound link tracking code shown below won’t work without it. (It could be made to work with legacy Analytics, but it’ll eventually stop working so it’s best to upgrade now.) Custom Event Tracking Analytics supports event tracking. Another simple one, you just paste it in and go. goo.gl/0a0b0c0 Then there are the ones that people hook up to autofeed into their Twitter accounts, and most of those come with their own shorteners. Links to Sailthru Hosted Pages are not tracked and are not included in reporting. Turn your links on and off, point them to a new destination or add new options any time. I like Bitly because it has a pretty interface and a login for all of the links you create. Having these tracking tools is key and really makes the management of ticket sales so much easier.Close Back to Mingle Tracking Link Clicks with Tag Manager Part I: The Basics Note: This post covers the underlying basics of link click tag setup.
Undo Undo URL Shortener @URL_Shorteners_ 7 Dec 2012 More Thanks. Twitter may be over capacity or experiencing a momentary hiccup. You can test that the certificate files were successfully processed by using one of your Hosted Pages.
Undo Undo URL Shortener @URL_Shorteners_ 10 Dec 2012 More Starting in February, 's URL shortener will add two more characters. Each tracker represents a group of users that share a common source. Once this is on your toolbar, you'll be able to make a TinyURL at the click of a button. Element URL contains mailto: This is where the firing rules are truly specific to tracking clicks on email addresses. Instead, think of source as a label identifying where the email came from or the kind of email it is. The associated shorthand link and URL are logged in a registry database.
Instead it is simply a pointer that forwards traffic to a different address. If you need to change your URL on your social network page, it's easy to do.) Bitly Bitly is at the top of the URL shortening game. A uniform resource locator (URL) is registered with a server. If you have stored your links in some document, you can copy/paste from there. Whenever you paste a link into Buffer to be scheduled to post at a later time, it automatically shortens the link for you. Combine methods: Use one or more of the above methods above. One of the most commonly asked question was how to track links in WordPress using Google Analytics? The more clicks you get on your AdF.ly links, the more money you earn. It provides statistics on clicks and shares, creates QR Codes automatically, enables Image Recognition (just upload images to link to your URL), it supports iBeacons, and you can specify mobile deep links, etc. Using placeholders, media partners can use a single click URL and automatically assign the correct values to your parameters.