Hotspot and Google Analytics

I have a company which puts hotspots and controls the Internet in hotels.

When the client connects to the network my system opens a login and password to allow access to the internet and I need to track with Google Analytics the login page, which does have limited internet access. I need a way to allow only the google analytics without having to release all google services.

I already try to put *. google-analytics.com and www.google-analytics.com * and * still could not allow access to GA

Thanks!

Correct me if I am wrong, but the google analytics scriptlet is Java based, I am not sure RouterOS can support. Even if you allowed it through the walled garden I think you would still run into problems.

Someone please correct me if different.

@scotthammersley its javascript based, not java…

btanuri: had a look at the JS File, and it requires https://www.google.com/analytics/web/inpage/pub/inpage.js also.

I have the same problem.
What is in the wallgarden?

Often these sites use more urls than you think like with paypal. You may need to look at the traffic and check if it’s trying to access more urls than you have allowed in walled garden?

How do I view traffic?

For example, this forum also uses a lot of URLs outside the mikrotik.com domain:
screen.jpg

I’ve already tried:
/ip hotspot walled-garden

add dst-host=www.google-analytics.com dst-port=80,443 server=HotSpot
add dst-host=gstatic.com dst-port=80,443 server=HotSpot
add dst-host=googleapis.com dst-port=80,443 server=HotSpot

I still can not do it.