Repository navigation
Expand file tree
/
Copy pathext_tables.sql
More file actions
214 lines (181 loc) · 7.04 KB
/
Copy pathext_tables.sql
File metadata and controls
214 lines (181 loc) · 7.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
CREATE TABLE tx_analytics_event (
uid int(11) NOT NULL auto_increment,
request_time int(11) unsigned NOT NULL DEFAULT 0,
site_identifier varchar(255) NOT NULL DEFAULT '',
page_id int(11) unsigned NOT NULL DEFAULT 0,
language_uid int(11) NOT NULL DEFAULT 0,
url_path varchar(2048) NOT NULL DEFAULT '',
visitor_hash char(64) NOT NULL DEFAULT '',
stable_visitor_hash char(64) NOT NULL DEFAULT '',
referrer_host varchar(255) DEFAULT NULL,
referrer_type varchar(20) NOT NULL DEFAULT 'direct',
device_type varchar(10) NOT NULL DEFAULT 'desktop',
browser varchar(10) NOT NULL DEFAULT 'other',
content_namespace varchar(100) DEFAULT NULL,
content_identifier varchar(255) DEFAULT NULL,
is_bot tinyint(1) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (uid),
KEY site_day (site_identifier, request_time),
KEY page_day (page_id, request_time)
);
CREATE TABLE tx_analytics_summary_page (
uid int(11) NOT NULL auto_increment,
day int(11) unsigned NOT NULL DEFAULT 0,
site_identifier varchar(255) NOT NULL DEFAULT '',
page_id int(11) unsigned NOT NULL DEFAULT 0,
language_uid int(11) NOT NULL DEFAULT 0,
content_namespace varchar(100) DEFAULT NULL,
content_identifier varchar(255) DEFAULT NULL,
pageviews int(11) unsigned NOT NULL DEFAULT 0,
unique_visitors int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (uid),
KEY day_site_page (day, site_identifier, page_id)
);
CREATE TABLE tx_analytics_summary_referrer (
uid int(11) NOT NULL auto_increment,
day int(11) unsigned NOT NULL DEFAULT 0,
site_identifier varchar(255) NOT NULL DEFAULT '',
page_id int(11) unsigned NOT NULL DEFAULT 0,
referrer_type varchar(20) NOT NULL DEFAULT '',
referrer_host varchar(255) DEFAULT NULL,
hits int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (uid),
KEY day_site_page (day, site_identifier, page_id)
);
CREATE TABLE tx_analytics_summary_device (
uid int(11) NOT NULL auto_increment,
day int(11) unsigned NOT NULL DEFAULT 0,
site_identifier varchar(255) NOT NULL DEFAULT '',
page_id int(11) unsigned NOT NULL DEFAULT 0,
device_type varchar(10) NOT NULL DEFAULT '',
hits int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (uid),
KEY day_site_page (day, site_identifier, page_id)
);
CREATE TABLE tx_analytics_summary_browser (
uid int(11) NOT NULL auto_increment,
day int(11) unsigned NOT NULL DEFAULT 0,
site_identifier varchar(255) NOT NULL DEFAULT '',
page_id int(11) unsigned NOT NULL DEFAULT 0,
browser varchar(10) NOT NULL DEFAULT '',
hits int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (uid),
KEY day_site_page (day, site_identifier, page_id)
);
CREATE TABLE tx_analytics_summary_language (
uid int(11) NOT NULL auto_increment,
day int(11) unsigned NOT NULL DEFAULT 0,
site_identifier varchar(255) NOT NULL DEFAULT '',
page_id int(11) unsigned NOT NULL DEFAULT 0,
language_uid int(11) NOT NULL DEFAULT 0,
hits int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (uid),
KEY day_site_page (day, site_identifier, page_id)
);
CREATE TABLE tx_analytics_summary_bounce (
uid int(11) NOT NULL auto_increment,
day int(11) unsigned NOT NULL DEFAULT 0,
site_identifier varchar(255) NOT NULL DEFAULT '',
page_id int(11) unsigned NOT NULL DEFAULT 0,
sessions int(11) unsigned NOT NULL DEFAULT 0,
bounces int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (uid),
KEY day_site_page (day, site_identifier, page_id)
);
CREATE TABLE tx_analytics_summary_visitor_type (
uid int(11) NOT NULL auto_increment,
day int(11) unsigned NOT NULL DEFAULT 0,
site_identifier varchar(255) NOT NULL DEFAULT '',
page_id int(11) unsigned NOT NULL DEFAULT 0,
visitor_type varchar(10) NOT NULL DEFAULT '',
hits int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (uid),
KEY day_site_page (day, site_identifier, page_id)
);
CREATE TABLE tx_analytics_summary_site (
uid int(11) NOT NULL auto_increment,
day int(11) unsigned NOT NULL DEFAULT 0,
site_identifier varchar(255) NOT NULL DEFAULT '',
pageviews int(11) unsigned NOT NULL DEFAULT 0,
unique_visitors int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (uid),
KEY day_site (day, site_identifier)
);
CREATE TABLE tx_analytics_summary_traffic (
uid int(11) NOT NULL auto_increment,
day int(11) unsigned NOT NULL DEFAULT 0,
site_identifier varchar(255) NOT NULL DEFAULT '',
page_id int(11) unsigned NOT NULL DEFAULT 0,
is_bot tinyint(1) unsigned NOT NULL DEFAULT 0,
hits int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (uid),
KEY day_site_page (day, site_identifier, page_id)
);
CREATE TABLE tx_analytics_summary_transition (
uid int(11) NOT NULL auto_increment,
day int(11) unsigned NOT NULL DEFAULT 0,
site_identifier varchar(255) NOT NULL DEFAULT '',
from_page_id int(11) unsigned NOT NULL DEFAULT 0,
to_page_id int(11) unsigned NOT NULL DEFAULT 0,
hits int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (uid),
KEY day_site_from (day, site_identifier, from_page_id)
);
CREATE TABLE tx_analytics_visitor_seen (
site_identifier varchar(255) NOT NULL DEFAULT '',
stable_visitor_hash char(64) NOT NULL DEFAULT '',
first_seen_day int(11) unsigned NOT NULL DEFAULT 0,
last_seen_day int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (site_identifier, stable_visitor_hash)
);
CREATE TABLE tx_analytics_gsc_site (
uid int(11) NOT NULL auto_increment,
day int(11) unsigned NOT NULL DEFAULT 0,
site_identifier varchar(255) NOT NULL DEFAULT '',
device_type varchar(10) NOT NULL DEFAULT '',
clicks int(11) unsigned NOT NULL DEFAULT 0,
impressions int(11) unsigned NOT NULL DEFAULT 0,
position_sum decimal(14,2) unsigned NOT NULL DEFAULT 0.00,
PRIMARY KEY (uid),
KEY day_site (day, site_identifier)
);
CREATE TABLE tx_analytics_gsc_page (
uid int(11) NOT NULL auto_increment,
day int(11) unsigned NOT NULL DEFAULT 0,
site_identifier varchar(255) NOT NULL DEFAULT '',
page_id int(11) unsigned NOT NULL DEFAULT 0,
clicks int(11) unsigned NOT NULL DEFAULT 0,
impressions int(11) unsigned NOT NULL DEFAULT 0,
position_sum decimal(14,2) unsigned NOT NULL DEFAULT 0.00,
PRIMARY KEY (uid),
KEY day_site_page (day, site_identifier, page_id)
);
CREATE TABLE tx_analytics_gsc_query (
uid int(11) NOT NULL auto_increment,
day int(11) unsigned NOT NULL DEFAULT 0,
site_identifier varchar(255) NOT NULL DEFAULT '',
page_id int(11) unsigned NOT NULL DEFAULT 0,
query varchar(255) NOT NULL DEFAULT '',
clicks int(11) unsigned NOT NULL DEFAULT 0,
impressions int(11) unsigned NOT NULL DEFAULT 0,
position_sum decimal(14,2) unsigned NOT NULL DEFAULT 0.00,
PRIMARY KEY (uid),
KEY day_site_page (day, site_identifier, page_id)
);
CREATE TABLE tx_analytics_gsc_url_map (
uid int(11) NOT NULL auto_increment,
site_identifier varchar(255) NOT NULL DEFAULT '',
url varchar(2048) NOT NULL DEFAULT '',
url_hash char(32) NOT NULL DEFAULT '',
page_id int(11) unsigned NOT NULL DEFAULT 0,
content_namespace varchar(100) DEFAULT NULL,
content_identifier varchar(255) DEFAULT NULL,
resolved_at int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (uid),
UNIQUE KEY site_url_hash (site_identifier, url_hash)
);
CREATE TABLE tx_analytics_gsc_import_state (
site_identifier varchar(255) NOT NULL DEFAULT '',
backfill_completed_until int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (site_identifier)
);