It is very important to know which URL shortening service to go for. Yourls is a way to homebrew your own shortened links so that you don’t have to rely on that middleman. Twitter will use this to make your timeline better. Personally, I use Hootsuite for all of my Twitter’ing so I don’t have the need to go out and shorten it separately. When it comes to online advertising and marketing, link tracking is king. Is this part of a broader campaign to talk about a new product?
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. Top-level domains of countries such as Libya (.ly), Samoa (.ws), Mongolia (.mn), Malaysia (.my) and Liechtenstein (.li) have been used as well as many others. I also worry that because shorteners are essentially open proxies of HTTP they’ll be exploited by spammers and malware distributors to the point where businesses, anti-phishing, and anti-virus services will be forced to block them.
Use this example as a model for your own links: Check out example.com Analytics Events Was this article helpful? Why would you want to use Google's service instead of bit.ly or ow.ly or is.gd, or any of the dozens and dozens of other URL shorteners out there? Twitter will use this to make your timeline better. Without taking this step, visits from emails will be recorded inconsistently. When the IShellLink::Resolve method is called and the referent file cannot be found, for example, when the user activates a shell shortcut, the tracking service is called automatically to find the file.
Use custom domains to multiply click-throughs and increase the public's awareness of my brands. It is highly recommended to enable if you are using Google Analytics on your site. The volume that holds the link source file is moved to another computer within the same domain. Google offers several free, online courses designed to help increase your analytics knowledge. If it’s an outbound link, we’ll cancel the click event and initiate Analytics event tracking.
For example, label the company logo that shows up on each email as "logo", or the main picture in an email as "main picture". 0 token (which also authorizes the request) and/or using the application's API key. Not everyone is a fan of link shorteners, though, suggesting that they only add a possible layer of failure to the web. They can also be maintained when a link source is moved within a computer. What’s really great is you don’t have to add any of your own custom javascript. If you send announcement emails outside the normal flow of newsletters or ads, this might be labeled "announcement". Paste your "Tracking ID" from Google Analytics into the text box. Backlinks: These are those links by which a visitor to your website can click and go to another website.