slimstat_track_pageview
The slimstat_track_pageview
action is triggered by the server-side tracker right before a pageview is saved into the database.
Usage:
do_action( 'slimstat_track_pageview', self::$stat );
Parameter:
$stat: An array containing the following data to be saved:
- id: Unique identifier for the pageview
- ip: IP address of the visitor
- other_ip: Secondary IP address if available
- username: Username of the visitor, if logged in
- country: Visitor’s country
- referer: URL of the referring page
- resource: URL of the current page
- searchterms: Search terms used by the visitor
- plugins: List of active plugins
- notes: Additional notes
- visit_id: Unique identifier for the visit
- server_latency: Server response time
- page_performance: Performance metrics of the page
- browser: Visitor’s browser name
- browser_version: Version of the browser
- browser_type: Type of browser (e.g., desktop, mobile)
- platform: Operating system
- language: Visitor’s language
- user_agent: Full user agent string
- resolution: Screen resolution
- screen_width: Screen width
- screen_height: Screen height
- content_type: Type of content viewed
- category: Content category
- author: Author of the content
- content_id: Unique identifier for the content
- outbound_resource: URL of the outbound resource
- dt: Date and time of the pageview
This hook allows developers to interact with and modify the pageview data before it is stored.