Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Thomas Lee 38 posts 79 karma points
    May 08, 2015 @ 06:22
    Thomas Lee
    1

    Capturing visitor ip address on click

    Hi guys, I am just getting started with Umbraco. My question is if there is a way to capture user/visitor IP address and other relevant information on click? If yes, is there any resource i can look at? I would like to store and analyze them. 

    Thanks in advance!

  • Urvish 252 posts 776 karma points
    May 08, 2015 @ 06:53
    Urvish
    1

    Hi Thomas,

    If you are using c# at backend than you can get IP Address on button click using server variable.

    HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
    

    Or else by using jQuery you can also get IP Address.

    Regards,

    Urvish Mandaliya

  • Urvish 252 posts 776 karma points
    May 08, 2015 @ 06:56
    Urvish
    1

    you can also use HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    May 08, 2015 @ 09:16
    Dennis Aaen
    0

    Hi Thomas and welcome to our :),

    If you want to capture user/visitor IP address and other relevant information on click I think that you should have a look at Google Analytics with this you can set up some tracking when the user visted your site, and one of the things is event tracking. Try to see more about event tracking here: https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide

    If you want to be able to see Google Analytics data from the Umbraco backoffice then you should have a look at the Google analytics package https://our.umbraco.org/projects/backoffice-extensions/analytics from Warren Buckley

    Hope this helps,

    /Dennis

  • Thomas Lee 38 posts 79 karma points
    May 08, 2015 @ 10:55
    Thomas Lee
    0

    Hi @Urvish and @Dennis,

     

    Thanks for the prompt reply. I will be sure to check them out. Umbraco feels so foregin right now, honestly. Haha. 

     

    Happy Coding anyway!

    Cheers

Please Sign in or register to post replies

Write your reply to:

Draft