Hi,

 

I am trying to get the pageViews for different Page in the my application but end up getting the cummulated figure.

Below is the code I am using. Please let me know where I can make the changes to get it working.

 

OmnitureWebService ws = new OmnitureWebService();

ws.RequestSoapContext.Security.Tokens.Add(new UsernameToken(wsUsername, wsSecret, PasswordOption.SendHashed));

WebProxy proxy = new WebProxy("XX.XXX.XXX.XXX", 80);

proxy.Credentials = new NetworkCredential("USERID", "Password", "Domain");

ws.Proxy = proxy;

string[] arr1 = new string[] { "reportSuiteId" };

string[] KeySearcharr = new string[] { "Product selection", "Personal details", "Delivery date", "Home Address Results", "Payment details", "Confirmation", "Thank You - Completed" };

report_suite_pages[] mypg = new report_suite_pages[20];

reportDescription rd = new reportDescription();

 

mypg = ws.ReportSuiteGetPages(100, "", arr1, DateTime.Now, 0);

rd.date = "2011-05-19"; //DateTime.Now.ToString("yyyy-MM-dd");// "2011-03-26";

rd.reportSuiteID = "reportSuiteId";

rd.dateGranularity = reportDefinitionDateGranularity.hour;

rd.metrics = new reportDefinitionMetric[] { new reportDefinitionMetric { id = "pageviews" } };

rd.elements = new reportDefinitionElement[] { new reportDefinitionElement { id = "page", search = new reportDefinitionSearch { keywords = KeySearcharr } } };

 

reportQueueResponse response = ws.ReportQueueOvertime(rd);

System.Threading.Thread.Sleep(5000);

reportResponse reportR = ws.ReportGetReport(response.reportID);

while (reportR.status != "done")

{

if (reportR.status.Contains("error"))

{

return;

}

}

Your help will be much appriciated.

Abhay Bhosale