tracking/ext_tables.sql
Daniel Siepmann 5f0490f493
WIP|Add flags feature
Allow each tracking record to contain arbitrary tags.
Those tags are generated via an API and can be extended by foreign
extensions or for individual projects.
Existing operating_system was moved to this new feature.
The update command allows to migrate existing records to this new
feature.

Those flags can be used when configuring widgets.

A new flag was added bot:yes and bot:no.
Bots are now tracked but flagged.

That new feature allows to build fine grained reports and makes the
extension way more flexible. Possible new implications:
    - Show visits from none bots
    - Show visits from bots
    - Show visits from specific bot
    - Add color to page views per page (bar chart)
      to color bot or none bot

WIP:
    - Update Yaml file to work like before, no bots in widgets
    - Add documentation (widgets)
    - Add documentation (migration *.yaml)
2022-09-21 17:33:27 +02:00

34 lines
1.2 KiB
SQL

CREATE TABLE tx_tracking_pageview (
url text,
user_agent text,
type int(11) unsigned DEFAULT '0' NOT NULL,
compatible_version varchar(11) DEFAULT 'v1.1.4' NOT NULL,
KEY page_views_per_page (pid,uid,crdate),
KEY language (l10n_parent,sys_language_uid),
KEY compatible_version (compatible_version),
);
CREATE TABLE tx_tracking_recordview (
url text,
user_agent text,
record varchar(255) DEFAULT '' NOT NULL,
record_uid int(11) unsigned DEFAULT '0' NOT NULL,
record_table_name varchar(255) DEFAULT '' NOT NULL,
compatible_version varchar(11) DEFAULT 'v1.1.4' NOT NULL,
KEY record_views_per_page (pid,uid,crdate),
KEY language (l10n_parent,sys_language_uid),
KEY compatible_version (compatible_version),
);
CREATE TABLE tx_tracking_tag (
record_uid int(11) unsigned DEFAULT '0' NOT NULL,
record_table_name varchar(255) DEFAULT '' NOT NULL,
name varchar(255) DEFAULT '' NOT NULL,
value longtext DEFAULT '' NOT NULL,
compatible_version varchar(11) DEFAULT 'v2.0.0' NOT NULL,
KEY combined_identifier (record_uid,record_table_name,name,value),
KEY compatible_version (compatible_version),
);