Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Something similar to google analytics for CP login screen?

    Scheduled Pinned Locked Moved Captive Portal
    8 Posts 2 Posters 3.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      luke240778
      last edited by

      I have  WiSP, and use pfSnse as my captive portal.  Does anyone know if there is any script/software similar to Google Analytics that i can code into the CP page, so i can see how many hits it gets per day?  I would like to know how many people are accessing the login screen that are not clients (clients get MAC passthrough)

      This will help me greatly to see how much coverage my business is actually getting around the city

      1 Reply Last reply Reply Quote 0
      • D
        dhatz
        last edited by

        Since pfsense is using lighttpd to serve the CP webpages, you could change its config to make it keep an access log (by default it is discarded into /dev/null) and analyze it. Most of the "hits" logged will probably be automated traffic e.g. by widgets (weather, stocks etc), OS & antivirus updates etc.

        By the way, MAC passthrough is trivial to circumvent in an open Wifi network.

        1 Reply Last reply Reply Quote 0
        • L
          luke240778
          last edited by

          dhatz thanks for the reply.  I have just found an article stating that i should be able to use google analytics on an intranet page without FQDN so i am going to try it out.. can you help me to find where the default CP page is located on the server?  Am logged into teh shell via ssh but not sure where to find the page i need to edit..

          ALso, yes i agree about the MAC passthrough. I am in the process over the next day or few to install new RADIUS server to handle all logins and do away with MAC passthrough.

          1 Reply Last reply Reply Quote 0
          • D
            dhatz
            last edited by

            Probably the easiest way would be to add the HTML code snippet which invokes GoogleAnalytics JS to your CP webpage and then upload it to your pfsense router from the webGUI.

            Since you won't be hosting GA locally, you'll probably need to add it to your "walled garden".

            1 Reply Last reply Reply Quote 0
            • L
              luke240778
              last edited by

              exactly, but as i am using the default captive portal page that is on pfSense, i am needing to know where i can find that file to edit it and add the GA code, can you tell me where that file lives?  I dont have a custom portal page as yet

              1 Reply Last reply Reply Quote 0
              • D
                dhatz
                last edited by

                The easiest would be to create a custom CP login page and upload it via webGUI, but you can look into /usr/local/captiveportal/index.php

                1 Reply Last reply Reply Quote 0
                • L
                  luke240778
                  last edited by

                  i actually just found and looked at that file, but it contains no HTML so im not sure how this captive portal on pfsense works. I mean, it doesnt contain the test as seen on the login page.. like Welcome to bla bla bla..

                  Also, creating a custom page, how do i get the 'Invalid RADIUS repsonse and Invalid password errors?

                  1 Reply Last reply Reply Quote 0
                  • L
                    luke240778
                    last edited by

                    I created a simple HTML page as a custom portal, using the

                    <form>code that is on the Captive Portal page as an example.. i uploaded it and i get this error that i dont know what to do about:

                    Jan 5 15:31:12 php[46101]: /index.php: Captive portal could not determine client's MAC address. Disable MAC address filtering in captive portal if you do not need this functionality.

                    I just have a username and a password on the form, nothing about MAC.. how do i get back to the original portal page now?</form>

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.