google analytics and page_load

I have a client with a website that we have added the google Analystics script to it.  He has a few pages that have links for pdf files.  So what I did was I have the page with the links (page1) calling a 'secondary' page (page1a) that has the google script on it so that we can track the user wanting to download the pdf.  So the logic is:
1) show page1 with pdf links.  
2) user clicks on pdf link #1 - goes to pdf#1link.aspx page...which in the page_load event has 'Response.redirect("1pdf").  in the html of pdf#1link.aspx page contains the google script.
3) user gets the pdf document

What I am wondering is if the script on the pdf#1link.aspx page will run BEFORE the page_load response.redirect("1.pdf") code will run...if not, under what event should I put the redirect?
Thanks
cenetadminAsked:
Who is Participating?
 
Praveen VenuConnect With a Mentor Technical Project ManagerCommented:
try to inject the javascript for redirection in the form load using Page.RegisterStartupScript

location.href='a.pdf';
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.