Structure and cron

Stats3x1 min readPage 7 of 7
On this page 3

File structure

core/components/stats3x/
  cron.php
  controllers/home-htmx.class.php
  elements/email/report.<lang>.tpl
  elements/plugins/ snippets/ widgets/
  lexicon/ (ru, en, de, es, pt)
  schema/stats3x.mysql.schema.xml
  src/
  data/ (stats3x.data_path)
    buffer/ replays/
  geo_ip/ (stats3x.geo_ipv4_path, stats3x.geo_ipv6_path)
assets/components/st3x/
  action.php
  config.inc.php
  htmx-connector.php
  js/st3x.js rec.js play.js
  css/mgr/ js/mgr/

Component tables: stats3x_visitors - visitors, stats3x_visits - visits, stats3x_hits - page views, stats3x_events - visitor actions, stats3x_daily - daily totals, stats3x_goals - goals, stats3x_conversions - goal conversions, stats3x_replays - session recordings, stats3x_tasks - cron tasks.

Cron tasks

  • parse (every minute) - parsing incoming data from buffer/.
  • daily (once an hour) - recalculating daily totals.
  • replays (every 5 minutes) - assembling session recordings from parts, deleting recordings older than stats3x.replay_keep_days days.
  • cleanup (once a day) - deleting detailed data older than stats3x.keep_details_days days.
  • vestnik (once an hour) - email report via Vestnik.
  • geo (once an hour, downloads once a month) - updating the IP2Location databases if stats3x.geo_token is set. Looks for a new database from the 2nd of the month; if IP2Location refuses (download limit for the token), waits a day.