A simple statistics view with page hits for this application.
The dynamic action on page 0 handles the page hit logging.
For the package below, you will need this: grant execute on dbms_crypto to tedstruik;
All the hashing of IP addresses is needed to comply with the AVG/GDPR laws. The MAC key (ted_secret_stuff.c_salt) is a secret random string, which I put in another package for obvious reasons.
The IPSTACK_JSON column is for future use, it might be useful to get some info on the IP (before we hash it).
Note 1: For a simpler method of logging page visits, you can also use the method described by Martin Giffy D'Souza, which is discussed on my Apex -> General -> Logs
page. That would be a bit easier to implement than this one, but also a bit less flexible.
Note 2: I really should find a way to filter out all the search bots from this list, like Google, Bing, etc. Some (most?) of these pages seem quite popular but that's just because some search bots keep visiting them over and over...
Note 3: In March 2021 my VPS provider OVH had some downtime, and in April my Users tablespace got filled up by accident - so nothing was logged for 10 days in March and after April 9th. And since I already planned to update this package, I have stopped logging for the moment. To be continued.