Skip to Main Content

Unique Visits per Month

Page Visits per Month

Info

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.

Code

Region

Identification
Sequence
Title
Type
Source
Source Type
Chart Series
Series Name
Sequence
Data Source Type
Data Source

Region

Identification
Sequence
Title
Type
Source
Source Type
Region Source
Chart Series
Series Name
Sequence

Table

Table
Name
DDL

View

View
Name
DDL

Materialized View

Materialized View
Name
ted_p1113_session_month_mv
DDL

Materialized View

Materialized View
Name
ted_p1113_session_page_month_mv
DDL

Package

Package
Name
Source

Package Body

Package Body
Name
Source

Dynamic Action

Note: This object is located on page 0
Identification
Name
Execution Options
Sequence
When
Event
Advanced
Event Scope
True Action
Identification
Action
Settings
Code
Execution Options
Sequence
Fire On Initialization