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. Short URLs, for example, will be subject to linkrot if the shortening service stops working; all URLs related to the service will become broken. Masking means that your affiliate URL never becomes visible in a browser address bar. • A very simple method if you have your own website is to create a blank html page and paste the following code into the blank page (substituting your affiliate URL). Then name the html page something that makes sense for the application such as .
Undo Herbert Bay, Entrepreneur and Computer Vision guy Answered 143w ago The word "best" is very relative and depends on your needs. If so, you may use the same campaign name for some of your emails, cpc ads and banner ads so that you can get a sense of how well the overall campaign is performing. Notice we added our own custom tracking text to the parameter so we could tell this link was the “Services Brochure”. For example: Services Brochure In the above URL we’ve added the parameter “?pdf=Services-Brochure” to the end of the PDF URL link.
All you need to do is register the domain and make a few changes to the domain configuration. Set a custom 404 URL so both search engines and visitors are sent to valid pages on my site when trying to follow any link that doesn't exist. Search Engines and Link Indexing Two methods that search engines use to discover links and pages: 1) Webmasters can inform search engines about new links with a submission form. Browse our list for inspiration: You'll likely get some great ideas just look at what others have done! The real benefit of using this link shortener comes with using it in conjunction with HootSuite itself for all your social media marketing.
To specify the internal links that are not tracked, in the Internal Filters box type all or part of the internal URL of the link target. Alternatively, users may view the properties of the link and copy the URL from within that menu.
An example Turn this URL: X0DER&pf_rd_s=center-10&pf_rd_r=11EYKTN682A79T370AM3&pf_rd_t=201&pf_rd_p=1270985982&pf_rd_i=B002Y27P3M into this TinyURL: Which one would you rather cut and paste into your browser? For instance, if you have a link pointing to personal information and only you or a family member uses it, then there is no method for a web crawler to find it. Brand the client's links to increase engagement and inspire audience trust. Tracking Links to your PDF Using Open Site Explorer you can take the full URL of your PDF and drop it directly into the search bar and click search. The service will remember your visit and display a list of the links you’ve shortened. But as Dave Winer articulated, there’s no reason we shouldn’t have a shortener ourselves, and here we are. 🙂 People are already using it.