Then when the page loads, it can load the Javascript and track the information in Google Analytics as expected. Many URL-shortener services offer the option to track how many clicks each link gets. My third choice, which was once my first choice, is Bitly.
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. 4Priority rules for Campaign Structure Parameters Data entered into parameters is used in as fully as possible, but priority is given to a consistent and logical tracker structure. You should see a new tag pop up telling you that it tracked the email link click event: Once you’ve confirmed the tag works, the next step is to save a new version and publish everything. It's usually a good idea to announce, on any of your social media services you plan to use the shortener on, that you'll be shortening links through a custom domain form now on just so users feel comfortable clicking the links. Links shared on Twitter, including links shared in Direct Messages, will automatically be processed and shortened to an link.
First thing you need to do is install and activate the Google Analytics for WordPress plugin. Below, we'll go over how to generate a basic tracking link and make modifications to it in the platform. Try again or visit Twitter Status for more information.Bit.ly vs Goo.gl — Best Way to Shorten URLs In the ever-growing age of social media, Facebook and Twitter have provided a great platform for the business firms to expand and promote their products online. Undo Undo URL Shortener @URL_Shorteners_ 21 Dec 2012 More Thanks. Click the “Shorten” or “Tiny!” button to shrink the size of the URL. This appends one of the two following parameters to the tracking link: url_id random_url When the url_id parameter is added to the tracking link, the numerical ID value references the ID of an additional offer URL in the offer that the affiliate can redirect traffic to: If there is more than one offer URL added in the offer, there will also be an option to select a random URL from the list.
Use a smart link to detect language preference of visitor and automatically route to either our English content or Spanish content. You can use this service with or without an account.
Then reconnect with the same interested audience when my sequel is ready to be released. If your organization has multiple people shortening links and posting them, be sure to provide access and training to everyone involved. Requests to the Google URL Shortener API for non-public user data must be authorized by an authenticated user. 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. White labeling lets me present a positive picture of our company as clients see our agency logo when they login to create URLs. Undo Undo Shorten links ! @sqrl_in 1 Mar 2010 More Shorten, share, comment and track your links ! via Thanks. Distributed Link Tracking Server The distributed link tracking server runs on each domain controller in a domain. Now let’s quickly see how to shorten links on Twitter in the easiest and user-friendly way possible. For example, to expand , send the following request: GET For instance, you could issue the following curl command: curl '' If successful, the response will look like: { "kind": "urlshortener#url", "id": "", "longUrl": "", "status": "OK" } id is the short URL you passed in. longUrl is the long URL to which it expands. We recommend using a variation of your name and/or your professional brand since you'll share this URL with people so they can find your LinkedIn profile. If your application uses Google Sign-In, some aspects of authorization are handled for you. More » AdF.ly AdF.ly takes an interesting approach to link shortening by offering its users the opportunity to earn money by using its service. You can always view clicks over a period of 24 hours, a month, and a custom date range. On other such services, using a URL shortener can allow linking to web pages which would otherwise violate this constraint.