Set up .htaccess to redirect mysite.com/download to go to the app store, then I post different links for different schools with the formats like mysite.com/download/someschool...
Assuming that you're redirecting everything after /download/
to an external site (i.e., the AppStore), this is the same as tracking Outbound links as Events.
As indicated by Google here:
Because links that lead away from your site are not automatically tracked by Google Analytics, you will need to manually tag all outbound links you want to track. To do this, you will add some custom JavaScript that uses the _trackEvent method to record these links and then modify the links you want to track.
As also highlighted there:
While it is also possible to use the _trackPageview method to record outbound links, using the _trackPageview method will cause your overall pageview count to increase. For this reason, we recommend using Event Tracking to record user activity not related to actual pageviews.
As indicated in the example provided there:
With this structure in place, you could then see Outbound Links as one of the event categories and drill down to see which particular outbound links are the most popular.
The steps for tracking outbound links covered in an example there (edited for your needs) are:
Delay the outbound click by a fraction of a second (to provide the browser more time load the tracking code) by adding this JavaScript before your
</head>
tag:<script type="text/javascript"> function trackOutboundLink(link, category, action) { try { _gaq.push(['_trackEvent', category , action]); } catch(err){} setTimeout(function() { document.location.href = link.href; }, 100); } </script>
Then you can log each click on your school links by adding an
onlick
event to trigger thetrackOutboundLink
function above:<a href="http://www.mysite.com/download/someschool" onClick="trackOutboundLink(this, 'Outbound Links', 'appstore.com'); return false;">
As specified in that example:
The example above uses the category label Outbound Links. This is a useful way to categorize all outbound links in the Event Tracking reports. It sets the specific name of the website as the second parameter in the call.
So change appstore.com
above to whatever external site you want to attribute the link to. Also be sure to use Be sure to use return false;
as indicated in theirthe example.
UsingBy using the above, you'll then be able to track how many people clicked on each school link and which link is most popular.