This is a migrated thread and some comments may be shown as answers.

Count Impression

4 Answers 81 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Kavindra Uniyal
Top achievements
Rank 2
Kavindra Uniyal asked on 10 Dec 2009, 12:01 PM
i am using radrotator for banner rotating .how i can count impression of each banner ?

4 Answers, 1 is accepted

Sort by
0
Shaun Peet
Top achievements
Rank 2
answered on 11 Dec 2009, 05:18 PM
Hello Kavindra,

You can use the client-side add_itemShowing method as defined here:

http://www.telerik.com/help/aspnet-ajax/rotator-clientside-api.html

This should get you started:

function trackImpression() {  
  var rotator = $find("<%= RadRotator1.ClientID %>");  
  var item = rotator.get_currentItem();  
  // Extract a value from the rotator item here.  
  // Then call a web service which increments the impressions   
  // for that banner's value.  
}  
function initTicker() {  
  var rotator = $find("<%= RadRotator1.ClientID %>");  
  rotator.add_itemShowing(trackImpression);  
}  
Sys.Application.add_load(initTicker); 

Hope that helps,

Shaun.
0
Kavindra Uniyal
Top achievements
Rank 2
answered on 12 Dec 2009, 07:04 AM
Hi Shaun,

Thanks for replying. Can u Provide me a working demo.


Kavindra Uniyal
0
Shaun Peet
Top achievements
Rank 2
answered on 12 Dec 2009, 02:16 PM
I don't have a working demo so I'll have to make one from scratch and post it to the code library.  That can take a few days if you're able to wait.
0
Fiko
Telerik team
answered on 15 Dec 2009, 12:54 PM
Hello Kavindra,

 You can use the OnItemClick event of the RadRotator control and implement your code in the attached handler. Additionally you can wrap the control in a RadAjaxPanel for better visual appearance. For your convenience I have attached a demo to the thread.

I hope this helps.


Sincerely yours,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Rotator
Asked by
Kavindra Uniyal
Top achievements
Rank 2
Answers by
Shaun Peet
Top achievements
Rank 2
Kavindra Uniyal
Top achievements
Rank 2
Fiko
Telerik team
Share this question
or