Count Impression

5 posts, 0 answers
  1. Kavindra Uniyal
    Kavindra Uniyal avatar
    2 posts
    Member since:
    Dec 2009

    Posted 10 Dec 2009 Link to this post

    i am using radrotator for banner rotating .how i can count impression of each banner ?
  2. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 11 Dec 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kavindra Uniyal
    Kavindra Uniyal avatar
    2 posts
    Member since:
    Dec 2009

    Posted 12 Dec 2009 Link to this post

    Hi Shaun,

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


    Kavindra Uniyal
  5. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 12 Dec 2009 Link to this post

    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.
  6. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 15 Dec 2009 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017