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

    I cannot used google analytics for captive portal

    Captive Portal
    3
    7
    1.4k
    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
      longits
      last edited by

      I had add url google-analytics.com to Allowed Hostnames. some time i cannot telnet google-analytics.com port 443,but some time i can.
      I think captive portal block it.

      connect to google-analytics.com by https.

      1 Reply Last reply Reply Quote 0
      • DerelictD
        Derelict LAYER 8 Netgate
        last edited by

        I would be highly-surprised if simply adding google-analytics.com to a captive portal pass list would actually be enough to be able to use google analytics in your portal page. My guess is it would load from far more addresses than that.

        I would packet capture a client and see what it's really trying to do. Or ask google what needs to be passed.

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

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

          Thank you!
          They are image I capture
          https://imgur.com/a/zCtFv84
          https://imgur.com/a/OAIo4ip
          Pls help me!

          1 Reply Last reply Reply Quote 0
          • DerelictD
            Derelict LAYER 8 Netgate
            last edited by

            Not sure I can. Sorry. You might be trying to do the impossible from behind a captive portal. You'll have to wait to see if someone else chimes in.

            Chattanooga, Tennessee, USA
            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
            Do Not Chat For Help! NO_WAN_EGRESS(TM)

            T 1 Reply Last reply Reply Quote 0
            • T
              trombone @Derelict
              last edited by

              This may not be what you are talking about. Here is how I use the captive portal to get a count of how many users connect to our library wireless. Setup a redirect in CP. Use the file manager in CP to save an HTML page with the GA code embedded near the top of the page. Just put whatever you want on the page itself. Every time a user accepts the Captive Portal terms ( or authenticates if that is what you are doing) it redirects to the page with the GA code and counts the login.

              1 Reply Last reply Reply Quote 0
              • DerelictD
                Derelict LAYER 8 Netgate
                last edited by

                That sounds like it is post-auth so there is no need to pass the traffic to google analytics. The portal is already bypassed in that case.

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                L 1 Reply Last reply Reply Quote 0
                • L
                  longits @Derelict
                  last edited by

                  @derelict said in I cannot used google analytics for captive portal:

                  That sounds like it is post-auth so there is no need to pass the traffic to google analytics. The portal is already bypassed in that case.
                  I dont think so. I had added domain www.google-analytics.com to Allowed Hostnames. This is domain Google's endpoint for track GA. But sometime client in private network cannot connect to https://www.google-analytics.com.
                  The same thing happens with the case domain ww.google.com.
                  I think google used many ip for www.google-analytics.com and Allowed Hostnames can not update mapping ip with domain.

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