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: content/terms/tutorials/track.md
+12-11Lines changed: 12 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,16 @@ weight: 1
7
7
8
8
This tutorial will guide you through tracking your first terms.
9
9
10
-
By the end, you'll have tracked a service's privacy policy. You will also have a basic understanding of how to declare a terms to track and how to run the engine.
10
+
By the end, you'll have tracked a service's privacy policy. You will also have a basic understanding of how to run the engine to track terms.
11
11
12
12
## Prerequisites
13
13
14
-
- Node.js installed on your system
15
-
- Basic familiarity with the command line
16
-
- A text editor
14
+
-[Node.js](https://nodejs.org/en) is installed on your system.
15
+
- You have basic familiarity with the command line.
16
+
- You have basic familiarity with HTML and CSS selectors.
17
+
- You know how to use a text editor.
17
18
18
-
## Track a terms
19
+
## Track terms
19
20
20
21
### Step 1: Set up the structure
21
22
@@ -34,20 +35,20 @@ By the end, you'll have tracked a service's privacy policy. You will also have a
34
35
35
36
For this tutorial, we will use the Privacy Policy of Open Terms Archive as an example.
36
37
37
-
1. Create a file `declarations/Open Terms Archive.js` with the basic structure, the first thing to declare is the service name:
38
+
Create a file `declarations/Open Terms Archive.json`. The name of the file is the name of the service that will be tracked. The first thing to declare is the tracked service name:
38
39
```json
39
40
{
40
41
"name": "Open Terms Archive"
41
42
}
42
43
```
43
44
44
-
Now, you can add a terms you want to track to the declaration. For this example, we will use the Privacy Policy of Open Terms Archive.
45
+
Now, you can add terms you want to track to the declaration. For this example, we will use the Privacy Policy.
45
46
46
-
You can go on the open terms archive website and copy the URL of the Privacy Policy to fill the `fetch` field.
47
+
You can go on the Open Terms Archive [website](https://opentermsarchive.org/) and copy the URL of its [Privacy Policy](https://opentermsarchive.org/en/privacy-policy/) to fill the `fetch` field.
47
48
48
49
And you can inspect the HTML of the page to get the selector of the content you want to extract to fill the `select` field.
49
50
50
-
2. Add the Privacy Policy document configuration:
51
+
The resulting declaration should look something like this:
51
52
```json
52
53
{
53
54
"name": "Open Terms Archive",
@@ -73,7 +74,7 @@ And you can inspect the HTML of the page to get the selector of the content you
73
74
```
74
75
75
76
3. Verify the results:
76
-
- Check the extracted version, which should contain the Privacy Policy of Open Terms Archive in the markdown format without insignificant content (like the header, footer, etc.): `./data/versions/Open Terms Archive/Privacy Policy.md`
77
-
- Check the snapshot, which is the original html document of the Open Terms Archive Privacy Policy: `./data/snapshots/Open Terms Archive/Privacy Policy.html`
77
+
- Check the extracted version, which should contain the Privacy Policy of Open Terms Archive in the Markdown format without any other content (no header, footer…): `./data/versions/Open Terms Archive/Privacy Policy.md`.
78
+
- Check the snapshot, which is the original HTML document of the Open Terms Archive Privacy Policy: `./data/snapshots/Open Terms Archive/Privacy Policy.html`.
78
79
79
80
Congratulations! You have tracked your first terms.
0 commit comments