Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I've written a simple redirect script in PHP that takes a resource ID and then redirects the user to the appropriate page.

The main motivation was if all of my links were to break because the service provider decided to disable them for whatever reason, I can update all links easily since they're in a single location.

Now that I actually have a redirect page up, I'm interested in knowing which resources are most popular.

I have looked at Google Analytics and it seems promising, but I am not sure how to set it up to capture what I want. My redirect page takes a set of parameters as such


I would like to keep track of each parameter (type, id) and the values. How can I accomplish this? Will there be a problem if the page does not load up completely before my redirect script kicks in and sends them off?

share|improve this question
add comment

1 Answer 1

On your redirect page use PHP to capture the parameters posted type and id, then fire off a custom event to track using those parameter values


share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.