I have a handful of subdomains set up as redirects because we are using them for QR codes.I want to be able to track the QR code redirects (which are already set up and printed so no changing them at this point) and see the effectiveness of each.Here's two examples: http://qr.glorkianwarrior.com and http://ad.glorkianwarrior.com are set up to forward to our iTunes page (later on this year it may forward to Google Play or a specific landing page), is there any way on my server to track the redirect from the subdomain to iTunes and see where traffic is coming from first?I have the redirects set up through cPanel presently using subdomains.Edit: From the research I've seen I can't track a 301 directly. If I redirect to an internal page and then do a timed redirect to the iTunes link, how long will it take for the tracking script to track a hit?
Is it possible to track redirects to external sites from our subdomains?
google analytics;redirects;analytics;tracking;cpanel
You can do this with PHP and Google Analytics.For each subdomain run a index.php file that will send data to Google Analytics and then give a header redirect response to send the visitor to itunes. Google will record the events in analytics and the user won't see anything different.Here is an example for a PHP redirect:https://stackoverflow.com/questions/768431/how-to-make-a-redirect-in-phpHere is the documentation for Google's Measurement Protocol API:https://developers.google.com/analytics/devguides/collection/protocol/v1/You can get details on the API here:https://developers.google.com/analytics/devguides/collection/protocol/v1/referenceThere is a PHP library on GitHub for this:https://github.com/google/google-api-php-client