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 decided to offer a free "mini" 5-day copywriter coaching program, to a small marketing list... ... [read more] 14 {{ upvoteCount | shortNum }} teddyjames in Internet Marketing Hey guys!
If you do nothing but add the tracking script to your pages, you’ll be faced with an endless stream of data and reports about user activity on your site. Twitter will use this to make your timeline better.
Twitter will use this to make your timeline better. This should be for the link domain only; no wildcards. The links are permanent, they will work as long as WordPress.com is around. People have learned that shortened links can lead to any random spam page on the web.
Demos & Tools uses this technique on the sign-in and sign-out buttons to help track the usage of those features. Undo Undo Shorten URL @ShortenURL 10 Jul 2011 More Statistics for Sunday, July 10, 2011 Thanks.
The download tracking properties of the framework are implemented as code in the analytics.sitecatalyst.js file that is generated for a page. Practice pasting URL You can practice copying and pasting the URL of this page by following the above steps and then pasting the URL into the below text box below. In the olden days, if you wanted Google Analytics to track a specific click on a link, you used to have to ask a web developer to fix this up for you. For example, "4" can be used for the "for" sound in a name. Over a quintillion, which would mean no user would have to worry about hitting that limit for over 2700 years at the same rate of one photo every minute. If you copy and paste this script exactly as it appears here, your outbound clicks will appear in your Analytics Events reports with a Category of "outbound" and an Action of "click". (In the snippet, these are shown in bold.) You can use these values, or change them and define your own values. Both of these services have their own strategy towards analytics and statistics. They aren't required for testing, only being logged into your HasOffers account is required to treat the click as a test link. Some URL shortening services support the forwarding of mailto URLs, as an alternative to address munging, to avoid unwanted harvest by web crawlers or bots. I like Bitly because it has a pretty interface and a login for all of the links you create. 2. They hide the parameters and business logic of your ads, that is otherwise exposed to users. 3. Charts and Graphs Get free real-time graphs so you can clearly visualize your link activity and see where you're getting the most response. For a full list of available tracking link parameters, read our Customizing an Affiliate Tracking Link article.