ga4-export-fixer 0.1.6-dev.3 → 0.1.6-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/defaultConfig.js +85 -0
- package/package.json +2 -1
package/defaultConfig.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*
|
|
2
|
+
These are the configuration defaults that can be extended.
|
|
3
|
+
|
|
4
|
+
For example, load the defaults in ga4EventsEnhanced.js and then extend them with whatever is psecific to the table.
|
|
5
|
+
After that, extend the configuration further with the user's configuration.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
The base configuration. Input config validation should always check these fields.
|
|
10
|
+
*/
|
|
11
|
+
const baseConfig = {
|
|
12
|
+
self: undefined,
|
|
13
|
+
incremental: undefined,
|
|
14
|
+
test: false,
|
|
15
|
+
testConfig: {
|
|
16
|
+
dateRangeStart: 'current_date()-1',
|
|
17
|
+
dateRangeEnd: 'current_date()',
|
|
18
|
+
},
|
|
19
|
+
preOperations: {
|
|
20
|
+
dateRangeStartFullRefresh: 'date(2000, 1, 1)',
|
|
21
|
+
dateRangeEnd: 'current_date()',
|
|
22
|
+
// incrementalStartOverride and incrementalEndOverride are used to override the date range start and end for incremental refresh
|
|
23
|
+
// this is useful if you want to re-process only a specific date range
|
|
24
|
+
incrementalStartOverride: undefined,
|
|
25
|
+
incrementalEndOverride: undefined,
|
|
26
|
+
numberOfPreviousDaysToScan: 10,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/*
|
|
31
|
+
The default configuration for the GA4 Events Enhanced table.
|
|
32
|
+
*/
|
|
33
|
+
const ga4EventsEnhancedConfig = {
|
|
34
|
+
...baseConfig,
|
|
35
|
+
sourceTable: undefined,
|
|
36
|
+
sourceTableType: 'GA4_EXPORT', // used with pre operations to detect if ga4 export specific pre operations are needed
|
|
37
|
+
// optional but recommended
|
|
38
|
+
schemaLock: undefined,
|
|
39
|
+
// only used with js tables
|
|
40
|
+
// dataformTableConfig: {},
|
|
41
|
+
// optional
|
|
42
|
+
includedExportTypes: {
|
|
43
|
+
daily: true,
|
|
44
|
+
intraday: true,
|
|
45
|
+
fresh: false,
|
|
46
|
+
},
|
|
47
|
+
timezone: 'Etc/UTC',
|
|
48
|
+
customTimestampParam: undefined,
|
|
49
|
+
dataIsFinal: {
|
|
50
|
+
detectionMethod: 'EXPORT_TYPE', // or 'DAY_THRESHOLD'
|
|
51
|
+
dayThreshold: 4 // only used if detectionMethod is 'DAY_THRESHOLD'
|
|
52
|
+
},
|
|
53
|
+
// number of additional days to take in for taking into account sessions that overlap days
|
|
54
|
+
bufferDays: 1,
|
|
55
|
+
// these parameters are excluded by default because they've been made available in other columns
|
|
56
|
+
defaultExcludedEventParams: [
|
|
57
|
+
'page_location',
|
|
58
|
+
'ga_session_id',
|
|
59
|
+
//'custom_event_timestamp', // removed if customTimestampParam is used
|
|
60
|
+
],
|
|
61
|
+
excludedEventParams: [],
|
|
62
|
+
eventParamsToColumns: [
|
|
63
|
+
//{name: 'page_location', type: 'string', columnName: 'page_location2'},
|
|
64
|
+
],
|
|
65
|
+
sessionParams: [],
|
|
66
|
+
defaultExcludedEvents: [],
|
|
67
|
+
// session_start and first_visit are excluded via the excludedEvents array
|
|
68
|
+
// this allows the user to include them if needed
|
|
69
|
+
excludedEvents: [
|
|
70
|
+
'session_start',
|
|
71
|
+
'first_visit'
|
|
72
|
+
],
|
|
73
|
+
defaultExcludedColumns: [
|
|
74
|
+
'event_dimensions', // legacy column, not needed
|
|
75
|
+
'traffic_source', // renamed to user_traffic_source
|
|
76
|
+
'session_id'
|
|
77
|
+
],
|
|
78
|
+
// exclude these columns when extracting raw data from the export tables
|
|
79
|
+
excludedColumns: [],
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
module.exports = {
|
|
83
|
+
baseConfig,
|
|
84
|
+
ga4EventsEnhancedConfig,
|
|
85
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ga4-export-fixer",
|
|
3
|
-
"version": "0.1.6-dev.
|
|
3
|
+
"version": "0.1.6-dev.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"constants.js",
|
|
12
12
|
"tables",
|
|
13
13
|
"inputValidation.js",
|
|
14
|
+
"defaultConfig.js",
|
|
14
15
|
"config.js"
|
|
15
16
|
],
|
|
16
17
|
"scripts": {
|