You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+17-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,23 @@
3
3
All notable changes to this project will be documented in this file.
4
4
This project adheres to [Semantic Versioning](http://semver.org/).
5
5
6
-
## [Unreleased]
6
+
## v0.6.0
7
+
8
+
### Changed
9
+
- Change the structure of the CLI actions
10
+
- Renamed the "show-status" action to "filters status"
11
+
- Renamed the "update-filters" action to "filters update"
12
+
- Renamed the "remove-filters" action to "filters remove"
13
+
- Renamed the "list-spam-domains" action to "domains list"
14
+
- Renamed the "find-spam-domains" action to "domains find"
15
+
- The spam-protection status calculation is now based on the number of spam domain names that are blocked by the existing filters - opposed to the number of filters which are up-to-date.
16
+
- Print status updates when removing the spam-filters from an account
17
+
18
+
### Added
19
+
- Add a logo for ga-spam-control
20
+
- Add animations/screencasts that illustrate the available actions and usage scenarios for ga-spam-control
Copy file name to clipboardexpand all lines: README.md
+71-36
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,10 @@
2
2
3
3
Command-line utility for automating the fight against Google Analytics referral spam
4
4
5
-
Google Analytics [referrer spam](https://en.wikipedia.org/wiki/Referer_spam) is pain.
6
-
There are hundreds of known referrer spam domains and every other day a new one pops up. And the only way to keep the spammers from skewing your web analytics reports is to block these spam domain names one by one.
5
+
Google Analytics [referrer spam](https://en.wikipedia.org/wiki/Referer_spam) is huge and never ending pain.
6
+
There are hundreds of known referrer spam domains and every other day a new one pops up. And the only way to keep the spammers from skewing your web analytics reports is to their stupid domain names – one by one.
**ga-spam-control** is a small command-line utility that keeps your Google Analytics spam filters up-to-date, automatically.
9
11
@@ -27,90 +29,122 @@ The command line utility provides the following actions.
27
29
28
30
In order to protect your Google Analytics account from spam **ga-spam-control** creates filters which blocks known referrer spam domains from your analytics reports. These are the commands that help you to review and update your spam filters:
29
31
30
-
1. Action: **show-status**
31
-
Display the spam-control status of all your accounts or for a specific account
32
-
2. Action: **update-filters**
33
-
Create or update the spam-control filters for a specific account
34
-
3. Action: **remove-filters**
35
-
Remove all spam-control filters from an account
32
+
-**filters status** displays the spam-control status of all your accounts or for a specific account
33
+
-**filters update** creates or updates the spam-control filters for a specific account
34
+
-**filters remove** removes all previously created spam-control filters from an account
36
35
37
36
**Referrer Spam Domains Actions**
38
37
39
38
The basis for the spam filters is an up-to-date list of known referrer spam domains. And with these commands you can review and update the spam-domain lists:
40
39
41
-
1. Action: **list-spam-domains**
42
-
Print a list of all currently known referrer spam domains
43
-
2. Action: **update-spam-domains**
44
-
Update the list of referrer spam domain names.
45
-
3. Action: **find-spam-domains**
46
-
Manually review the last `n` days of analytics data and mark domain names as spam
40
+
-**domains list** prints a list of all currently known referrer spam domains
41
+
-**domains update** downloads the latest referrer spam domain name lists and updates your local list of known referrer spam domains
42
+
-**domains find** allows you to manually review the last `n` days of analytics data and mark domain names as spam
47
43
48
44
Which domains are currently considered spam is stored in the `~/.ga-spam-control/spam-domains/community.txt` and `~/.ga-spam-control/spam-domains/personal.txt`.
49
45
50
-
## Usage
46
+
## Using ga-spam-control
51
47
52
48
```bash
53
49
ga-spam-control <command> [<args> ...]
54
50
```
55
51
56
-
### Print help information
52
+
### Help
53
+
54
+
Print information about the available actions:
55
+
56
+
```bash
57
+
ga-spam-control help
58
+
```
59
+
60
+
Print detailed help information about the different arguments and flags of a specific action:
57
61
58
62
```bash
59
-
ga-spam-control --help
63
+
ga-spam-control help<actionname>
60
64
```
61
65
62
-
### Display spam-control status
66
+
### Authorizing ga-spam-control to access your Google Analytics accounts
67
+
68
+
The first time you perform an action, you will be displayed an oAuth authorization dialog.
69
+
If you permit the requested rights the authentication token will be stored in your home directory (`~/.ga-spam-control/credentials.json`).
70
+
71
+

72
+
73
+
To sign out you can either delete the file or de-authorize the "Google Analytics Spam Control" app in your Google App Permissions at https://security.google.com/settings/security/permissions.
74
+
75
+
### Get your spam-Control status
63
76
64
-
Display the current spam-control **show-status** for all accounts that you have access to:
77
+
Display the current spam-control **status** for all accounts that you have access to:
65
78
66
79
```bash
67
-
ga-spam-control show-status
80
+
ga-spam-control filters status
68
81
```
69
82
70
83
Display the spam-control status in a parseable format:
71
84
72
85
```bash
73
-
ga-spam-control show-status --quiet
86
+
ga-spam-control filters status --quiet
74
87
```
75
88
76
89
Display the current spam-control **status** for a specific Google Analytics account:
77
90
78
91
```bash
79
-
ga-spam-control show-status <accountID>
92
+
ga-spam-control filters status <accountID>
80
93
```
81
94
82
-
### Install or update spam-control filters
95
+

96
+
97
+
### Install or update filters
83
98
84
-
**update** the spam-control filters for a specific Google Analytics account:
99
+
Create or update the spam-control filters of a given Google Analytics account:
85
100
86
101
```bash
87
-
ga-spam-control update-filters <accountID>
102
+
ga-spam-control filters update<accountID>
88
103
```
89
104
90
-
### Uninstall spam-control filters
105
+

91
106
92
-
**remove** the spam-control filters for a specific Google Analytics account:
107
+
### Uninstall filters
108
+
109
+
Remove the spam-control filters of a given Google Analytics account:
93
110
94
111
```bash
95
-
ga-spam-control remove-filters <accountID>
112
+
ga-spam-control filters remove<accountID>
96
113
```
97
114
98
-
### Find new referrer spam in your accounts
115
+
This will simply remove all filters that ga-spam-control created earlier.
116
+
117
+
### List all known spam domains
99
118
100
-
The **find-spam-domains** displays referrer domain names from the last `n ` days of analytics data to you for review.
119
+
Print a list of your known referrer spam domains names (community & personal):
By default ga-spam-control will use the last 90 days of analytics data. But if you want to review less or more days you can specify the number of days yourself.
125
+

107
126
108
-
**Authentication**
127
+
### Update your list of known spam domains
109
128
110
-
The first time you perform an action, you will be displayed an oAuth authorization dialog.
111
-
If you permit the requested rights the authentication token will be stored in your home directory (`~/.ga-spam-control/credentials.json`).
129
+
Update your local community list of known referrer spam domain names:
112
130
113
-
To sign out you can either delete the file or de-authorize the "Google Analytics Spam Control" app in your Google App Permissions at https://security.google.com/settings/security/permissions.
131
+
```bash
132
+
ga-spam-control domains update
133
+
```
134
+
135
+

136
+
137
+
### Find new spam domains
138
+
139
+
Find referrer spam domain names in your Google Analtics data. Review the hostnames of the last `n` days of one of your Google Analytics accounts and mark those which you consider spam. All marked domain names will be added to your personal referrer spam list:

146
+
147
+
By default ga-spam-control will use the last 90 days of analytics data. But if you want to review less or more days you can specify the number of days yourself.
114
148
115
149
## Installation
116
150
@@ -140,6 +174,7 @@ See [LICENSE](LICENSE) for the full license text.
140
174
Ideally Google would just include a spam-protection into Google Analytics but until then here are some ideas for additional features and possible improvements:
141
175
142
176
- Make remote spam domain providers configurable
177
+
- Publish spam domain names that you found in your Google Analytics accounts back to the community lists.
143
178
- Populate my own list of known referrer spam domains with the results from the `find-spam-domains` action.
144
179
- Automatic daily upload from the ga-spam-control clients
145
180
- Review of the additions by trusted community members or by a tool which checks the listed website
listDomainsCommand:=domainsCommand.Command("list", "List all currently known spam domains")
71
73
72
-
findSpamDomains:=app.Command("find-spam-domains", fmt.Sprintf("Find new referrer spam domains in your analytics data and write them to your private referrer spam list (%q)", personalSpamListFilePath))
74
+
updateSpamDomainsCommand:=domainsCommand.Command("update", fmt.Sprintf("Update your list of known referrer spam domains (%q)", communitySpamListFilePath))
75
+
updateSpamDomainsQuiet:=updateSpamDomainsCommand.Flag("quiet", "Display results in a parsable format").Short('q').Bool()
76
+
77
+
findSpamDomains:=domainsCommand.Command("find", fmt.Sprintf("Find new referrer spam domains in your analytics data and write them to your private referrer spam list (%q)", personalSpamListFilePath))
0 commit comments