?
Solved

google analytics and page_load

Posted on 2008-11-12
1
Medium Priority
?
396 Views
Last Modified: 2013-12-17
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
0
Comment
Question by:cenetadmin
1 Comment
 
LVL 15

Accepted Solution

by:
Praveen Venu earned 1500 total points
ID: 23011210
try to inject the javascript for redirection in the form load using Page.RegisterStartupScript

location.href='a.pdf';
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month16 days, 20 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question