Skip to content

Commit 6a6b938

Browse files
committed
Update pagePath dimension filters to exclude (data deleted)
1 parent 701f73d commit 6a6b938

File tree

2 files changed

+51
-4
lines changed

2 files changed

+51
-4
lines changed

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,18 @@ npm run coverage
109109

110110
The integration tests for this repo require the google analytics credentials to
111111
be set in the environment. This can be setup with the dotenv-cli package as
112-
described in "Setup Environment" section above.
112+
described in the [Setup Environment](#setup-environment) section.
113113

114114
Note that these tests make real requests to google analytics APIs and should be
115115
run sparingly to avoid being rate limited in our live apps which use the
116116
same account credentials.
117117

118118
```bash
119119
# Run cucumber integration tests
120-
dotenv -e .env npm run cucumber
120+
npx dotenv -- npm run cucumber
121121

122122
# Run cucumber integration tests with node debugging enabled
123-
dotenv -e .env npm run cucumber:debug
123+
npx dotenv -- npm run cucumber:debug
124124
```
125125

126126
The cucumber features and support files can be found in the `features` directory
@@ -129,7 +129,7 @@ The cucumber features and support files can be found in the `features` directory
129129

130130
#### Setup environment
131131

132-
See "Configuration and Google Analytics Setup" below for the required environment variables and other setup for Google Analytics auth.
132+
See [Configuration - Google Analytics](#google-analytics) for the required environment variables and other setup for Google Analytics auth.
133133

134134
It may be easiest to use the dotenv-cli package to configure the environment for the application.
135135

@@ -165,6 +165,17 @@ npx dotenv -e .env.analytics node -- deploy/publisher.js
165165
npx dotenv -e .env.analytics node -- deploy/consumer.js
166166
```
167167

168+
To run a single report for a specific agency, set AGENCY_NAME and ANALYTICS_REPORT_IDS in your .env file (refer to `../deploy/agencies.json`)
169+
and then run:
170+
171+
```bash
172+
# general format
173+
npx dotenv -- npm start -- --only=REPORT_NAME --json --output=/path/to/output
174+
175+
# example
176+
npx dotenv -- npm start -- --only=devices --json --output=./output
177+
```
178+
168179
## Configuration
169180

170181
### Google Analytics

reports/usa.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4994,6 +4994,7 @@
49944994
"fieldName": "pagePath",
49954995
"inListFilter": {
49964996
"values": [
4997+
"(data deleted)",
49974998
"(other)",
49984999
"other",
49995000
"(not set)",
@@ -5069,6 +5070,7 @@
50695070
"fieldName": "pagePath",
50705071
"inListFilter": {
50715072
"values": [
5073+
"(data deleted)",
50725074
"(other)",
50735075
"other",
50745076
"(not set)",
@@ -5144,6 +5146,7 @@
51445146
"fieldName": "pagePath",
51455147
"inListFilter": {
51465148
"values": [
5149+
"(data deleted)",
51475150
"(other)",
51485151
"other",
51495152
"(not set)",
@@ -5219,6 +5222,7 @@
52195222
"fieldName": "pagePath",
52205223
"inListFilter": {
52215224
"values": [
5225+
"(data deleted)",
52225226
"(other)",
52235227
"other",
52245228
"(not set)",
@@ -5294,6 +5298,7 @@
52945298
"fieldName": "pagePath",
52955299
"inListFilter": {
52965300
"values": [
5301+
"(data deleted)",
52975302
"(other)",
52985303
"other",
52995304
"(not set)",
@@ -5369,6 +5374,7 @@
53695374
"fieldName": "pagePath",
53705375
"inListFilter": {
53715376
"values": [
5377+
"(data deleted)",
53725378
"(other)",
53735379
"other",
53745380
"(not set)",
@@ -5444,6 +5450,7 @@
54445450
"fieldName": "pagePath",
54455451
"inListFilter": {
54465452
"values": [
5453+
"(data deleted)",
54475454
"(other)",
54485455
"other",
54495456
"(not set)",
@@ -5519,6 +5526,7 @@
55195526
"fieldName": "pagePath",
55205527
"inListFilter": {
55215528
"values": [
5529+
"(data deleted)",
55225530
"(other)",
55235531
"other",
55245532
"(not set)",
@@ -5594,6 +5602,7 @@
55945602
"fieldName": "pagePath",
55955603
"inListFilter": {
55965604
"values": [
5605+
"(data deleted)",
55975606
"(other)",
55985607
"other",
55995608
"(not set)",
@@ -5669,6 +5678,7 @@
56695678
"fieldName": "pagePath",
56705679
"inListFilter": {
56715680
"values": [
5681+
"(data deleted)",
56725682
"(other)",
56735683
"other",
56745684
"(not set)",
@@ -5744,6 +5754,7 @@
57445754
"fieldName": "pagePath",
57455755
"inListFilter": {
57465756
"values": [
5757+
"(data deleted)",
57475758
"(other)",
57485759
"other",
57495760
"(not set)",
@@ -5819,6 +5830,7 @@
58195830
"fieldName": "pagePath",
58205831
"inListFilter": {
58215832
"values": [
5833+
"(data deleted)",
58225834
"(other)",
58235835
"other",
58245836
"(not set)",
@@ -5894,6 +5906,7 @@
58945906
"fieldName": "pagePath",
58955907
"inListFilter": {
58965908
"values": [
5909+
"(data deleted)",
58975910
"(other)",
58985911
"other",
58995912
"(not set)",
@@ -5969,6 +5982,7 @@
59695982
"fieldName": "pagePath",
59705983
"inListFilter": {
59715984
"values": [
5985+
"(data deleted)",
59725986
"(other)",
59735987
"other",
59745988
"(not set)",
@@ -6044,6 +6058,7 @@
60446058
"fieldName": "pagePath",
60456059
"inListFilter": {
60466060
"values": [
6061+
"(data deleted)",
60476062
"(other)",
60486063
"other",
60496064
"(not set)",
@@ -6119,6 +6134,7 @@
61196134
"fieldName": "pagePath",
61206135
"inListFilter": {
61216136
"values": [
6137+
"(data deleted)",
61226138
"(other)",
61236139
"other",
61246140
"(not set)",
@@ -6176,6 +6192,26 @@
61766192
"dimensionFilter": {
61776193
"andGroup": {
61786194
"expressions": [
6195+
{
6196+
"notExpression": {
6197+
"filter": {
6198+
"fieldName": "pagePath",
6199+
"stringFilter": {
6200+
"inListFilter": {
6201+
"values": [
6202+
"(data deleted)",
6203+
"(other)",
6204+
"other",
6205+
"(not set)",
6206+
"null",
6207+
""
6208+
],
6209+
"caseSensitive": false
6210+
}
6211+
}
6212+
}
6213+
}
6214+
},
61796215
{
61806216
"notExpression": {
61816217
"filter": {

0 commit comments

Comments
 (0)