-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
39 lines (32 loc) · 1.19 KB
/
index.js
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
const ecommerce_test = require("./includes/ecommerce_test");
const session_quality_test = require("./includes/session_quality_test");
const user_quality_test = require("./includes/user_quality_test");
const overview = require("./includes/overview");
module.exports = (params) => {
params = {
date_start: "20230101",
date_end: "20230601",
ga4:{
project: "bigquery-public-data",
dataset: "ga4_obfuscated_sample_ecommerce",
table: "events_*",
},
config:{
schema: "ga4_testing",
},
...params
};
const ga4_source = declare({
database: params.ga4.project,
schema: params.ga4.dataset,
name: "events_*",
});
let result = {
ga4_source: ga4_source,
ecommerce_test: ecommerce_test(params.ga4.table,params.date_start,params.date_end,params.config),
session_quality_test: session_quality_test(params.ga4.table,params.date_start, params.date_end, params.config),
user_quality_test: user_quality_test(params.ga4.table,params.date_start, params.date_end, params.config),
overview: overview(params.ga4.table,params.date_start, params.date_end, params.config),
};
return result;
}