Setting the transport method to 'beacon' lets the hit be sent * using 'navigator.sendBeacon' in browser that support it. */ var trackOutboundLink = function(url) { ga('send', 'event', 'outbound', 'click', url, { 'transport': 'beacon', 'hitCallback': function(){document.location = url;} }); } You'll also need to add (or modify) the onclick attribute to your links. The general idea people have about Google Analytics is that it tells you how many vistors and pageviews you are getting, where the traffic is coming from, and what content is popular on your website.
Please note: anyone with a t.co shortened link will be able to navigate to the destination URL. They enable campaigns with limited text space, such as SMS campaigns. More over, all these statistics & reports come with no cost. Typically, it’s used for recording on-page JavaScript-controlled interactivity such as opening a widget or making an Ajax call. Note: In the below image, more than one language is enabled for the site, therefore the link includes the associated language.
All three of these descriptive items will show up in your GA reporting interface, telling you stuff about the link users clicked on. Typically, data: and javascript: URLs are not supported for security reasons. All you have to do is enter your destination URL, and give your tracking link a name. Yourls is a way to homebrew your own shortened links so that you don’t have to rely on that middleman. Is there more than one type of Google Analytics tracking on your links? If you combine MailChimp's Google Analytics tracking with custom UTM tracking, this could skew results in reports.
Link Tracking Limitations The distributed link tracking services are available only on the NTFS file system, and are only available for link sources on NTFS 3. Our link service measures information such as how many times a link has been clicked, which is an important quality signal in determining how relevant and interesting each Tweet is when compared to similar Tweets. When used this way, all user activity on such elements is calculated and displayed as Events in the Analytics reporting interface. You should add this script in your page header, but not within the basic Analytics tracking code snippet. Your custom title will also appear at the end of the URL parameter, so you can see the stats for each individual PDF. 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.
The solution… We’ll attach a click event handler to the body element. On other such services, using a URL shortener can allow linking to web pages which would otherwise violate this constraint. After that, it’s up to you to decide what you need. At that time, Google will completely disable the URL shortener and all associated data will be lost. Notice we added our own custom tracking text to the parameter so we could tell this link was the “Services Brochure”. They just want it to be short, make the bezels small or remove it completely. Browse our list for inspiration: You'll likely get some great ideas just look at what others have done! Privacy and security[edit] A short URL obscures the target address and can be used to redirect to an unexpected site.