Skip to content

Commit a578c3f

Browse files
committed
fixup: occurrence -> tracking event
Signed-off-by: Todd Baert <[email protected]>
1 parent 16b6eff commit a578c3f

File tree

5 files changed

+29
-27
lines changed

5 files changed

+29
-27
lines changed

specification.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@
10611061
{
10621062
"id": "Conditional Requirement 6.1.1.1",
10631063
"machine_id": "conditional_requirement_6_1_1_1",
1064-
"content": "The `client` MUST define a function for tracking the occurrence of a particular action or application state, with parameters `occurrence key` (string, required), `evaluation context` (optional) and `occurrence details` (optional) which returns nothing.",
1064+
"content": "The `client` MUST define a function for tracking the occurrence of a particular action or application state, with parameters `tracking event name` (string, required), `evaluation context` (optional) and `tracking event details` (optional), which returns nothing.",
10651065
"RFC 2119 keyword": "MUST",
10661066
"children": []
10671067
}
@@ -1076,7 +1076,7 @@
10761076
{
10771077
"id": "Conditional Requirement 6.1.2.1",
10781078
"machine_id": "conditional_requirement_6_1_2_1",
1079-
"content": "The `client` MUST define a function for tracking the occurrence of a particular action or application state, with parameters `occurrence key` (string, required) and `occurrence details` (optional) which returns nothing.",
1079+
"content": "The `client` MUST define a function for tracking the occurrence of a particular action or application state, with parameters `tracking event name` (string, required) and `tracking event details` (optional), which returns nothing.",
10801080
"RFC 2119 keyword": "MUST",
10811081
"children": []
10821082
}
@@ -1099,14 +1099,14 @@
10991099
{
11001100
"id": "Requirement 6.2.1",
11011101
"machine_id": "requirement_6_2_1",
1102-
"content": "The `occurrence details` structure MUST define an optional numeric `value`, associating a scalar quality with an `occurrence`.",
1102+
"content": "The `tracking event details` structure MUST define an optional numeric `value`, associating a scalar quality with an `tracking event`.",
11031103
"RFC 2119 keyword": "MUST",
11041104
"children": []
11051105
},
11061106
{
11071107
"id": "Requirement 6.2.2",
11081108
"machine_id": "requirement_6_2_2",
1109-
"content": "The `occurrence details` MUST support the inclusion of custom fields, having keys of type `string`, and values of type `boolean | string | number | structure`.",
1109+
"content": "The `tracking event details` MUST support the inclusion of custom fields, having keys of type `string`, and values of type `boolean | string | number | structure`.",
11101110
"RFC 2119 keyword": "MUST",
11111111
"children": []
11121112
}

specification/glossary.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ This document defines some terms that are used across this specification.
4646
- [Targeting Key](#targeting-key)
4747
- [Fractional Evaluation](#fractional-evaluation)
4848
- [Rule](#rule)
49-
- [Tracking Occurrence](#tracking-occurrence)
49+
- [Tracking Event](#tracking-event)
5050
- [SDK Paradigms](#sdk-paradigms)
5151
- [Dynamic-Context Paradigm](#dynamic-context-paradigm)
5252
- [Static-Context Paradigm](#static-context-paradigm)
@@ -201,7 +201,7 @@ Pseudorandomly resolve flag values using a context property, such as a targeting
201201

202202
A rule is some criteria that's used to determine which variant a particular context should be mapped to.
203203

204-
### Tracking Occurrence
204+
### Tracking Event
205205

206206
A particular user action or application state representing a business objective or outcome, identified by a unique string, and recorded using the [tracking API](./sections/06-tracking.md).
207207

specification/sections/02-providers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ class MyProvider implements Tracking {
281281
/**
282282
* Record a tracking occurrence.
283283
*/
284-
void track(String occurrenceKey, EvaluationContext context, OccurrenceDetails details): void;
284+
void track(String trackingEventName, EvaluationContext context, TrackingEventDetails details): void;
285285
286286
//...
287287
}

specification/sections/06-tracking.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ see: [dynamic-context paradigm](../glossary.md#dynamic-context-paradigm)
3333

3434
##### Conditional Requirement 6.1.1.1
3535

36-
> The `client` **MUST** define a function for tracking the occurrence of a particular action or application state, with parameters `occurrence key` (string, required), `evaluation context` (optional) and `occurrence details` (optional) which returns nothing.
36+
> The `client` **MUST** define a function for tracking the occurrence of a particular action or application state, with parameters `tracking event name` (string, required), `evaluation context` (optional) and `tracking event details` (optional), which returns nothing.
3737
3838
```java
39-
// example tracking occurrence recording that a subject reached a page associated with a business goal
39+
// example tracking event recording that a subject reached a page associated with a business goal
4040
client.track("visited-promo-page", evaluationContext);
4141

42-
// example tracking occurrence recording that a subject performed an action associated with a business goal, with the occurrence details having a particular numeric value
43-
client.track("clicked-checkout", evaluationContext, new OccurrenceDetails(99.77));
42+
// example tracking event recording that a subject performed an action associated with a business goal, with the tracking event details having a particular numeric value
43+
client.track("clicked-checkout", evaluationContext, new TrackingEventDetails(99.77));
4444

45-
// example tracking occurrence recording that a subject performed an action associated with a business goal, with the occurrence details having a particular numeric value
46-
client.track("clicked-checkout", evaluationContext, new OccurrenceDetails(99.77).add("currencyCode", "USD"));
45+
// example tracking event recording that a subject performed an action associated with a business goal, with the tracking event details having a particular numeric value
46+
client.track("clicked-checkout", evaluationContext, new TrackingEventDetails(99.77).add("currencyCode", "USD"));
4747
```
4848

49-
See [evaluation context](../types.md#evaluation-context), [occurrence details](#62-occurrence-details).
49+
See [evaluation context](../types.md#evaluation-context), [tracking event details](#62-tracking-event-details).
5050

5151
#### Condition 6.1.2
5252

@@ -58,20 +58,20 @@ see: [static-context paradigm](../glossary.md#static-context-paradigm)
5858

5959
##### Conditional Requirement 6.1.2.1
6060

61-
> The `client` **MUST** define a function for tracking the occurrence of a particular action or application state, with parameters `occurrence key` (string, required) and `occurrence details` (optional) which returns nothing.
61+
> The `client` **MUST** define a function for tracking the occurrence of a particular action or application state, with parameters `tracking event name` (string, required) and `tracking event details` (optional), which returns nothing.
6262
6363
The track function is a void function (function returning nothing).
6464
Though it may be associated with network activity or other I/O, it need not be awaited by application authors.
6565

6666
```java
67-
// example tracking occurrence recording that a subject reached a page associated with a business goal
67+
// example tracking event recording that a subject reached a page associated with a business goal
6868
client.track("visited-promo-page");
6969

70-
// example tracking occurrence recording that a subject performed an action associated with a business goal, with the occurrence details having a particular numeric value
71-
client.track("clicked-checkout", new OccurrenceDetails(99.77));
70+
// example tracking event recording that a subject performed an action associated with a business goal, with the tracking event details having a particular numeric value
71+
client.track("clicked-checkout", new TrackingEventDetails(99.77));
7272

73-
// example tracking occurrence recording that a subject performed an action associated with a business goal, with the occurrence details having a particular numeric and some additional details
74-
client.track("clicked-checkout", new OccurrenceDetails(99.77).add("currencyCode", "USD"));
73+
// example tracking event recording that a subject performed an action associated with a business goal, with the tracking event details having a particular numeric and some additional details
74+
client.track("clicked-checkout", new TrackingEventDetails(99.77).add("currencyCode", "USD"));
7575
```
7676

7777
#### Requirement 6.1.3
@@ -86,22 +86,22 @@ See: [context levels and merging](./03-evaluation-context.md#32-context-levels-a
8686

8787
> If the client's `track` function is called and the associated provider does not implement tracking, the client's `track` function **MUST** no-op.
8888
89-
### 6.2. Occurrence Details
89+
### 6.2. Tracking Event Details
9090

91-
The `occurrence details` structure defines optional data pertinent to a particular `occurrence`.
91+
The `tracking event details` structure defines optional data pertinent to a particular `tracking event`.
9292

9393
#### Requirement 6.2.1
9494

95-
> The `occurrence details` structure **MUST** define an optional numeric `value`, associating a scalar quality with an `occurrence`.
95+
> The `tracking event details` structure **MUST** define an optional numeric `value`, associating a scalar quality with an `tracking event`.
9696
9797
`Value` is a well-defined field which some providers may map to equivalent numeric values in their API.
9898

9999
See [provider tracking support](./02-providers.md#27-tracking-support).
100100

101101
#### Requirement 6.2.2
102102

103-
> The `occurrence details` **MUST** support the inclusion of custom fields, having keys of type `string`, and values of type `boolean | string | number | structure`.
103+
> The `tracking event details` **MUST** support the inclusion of custom fields, having keys of type `string`, and values of type `boolean | string | number | structure`.
104104
105-
The `occurrence details` supports the addition of arbitrary fields, including nested objects, similar to the `evaluation context` and object-typed flag values.
105+
The `tracking event details` supports the addition of arbitrary fields, including nested objects, similar to the `evaluation context` and object-typed flag values.
106106

107107
See [structure](../types.md#structure), [evaluation context](.//03-evaluation-context.md).

specification/types.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ An enumeration of provider events.
189189
A function or method which can be associated with a `provider event`, and runs when that event occurs.
190190
It declares an `event details` parameter.
191191

192-
### Occurrence Details
192+
### Tracking Event Details
193193

194-
See [occurrence details](./sections/06-tracking.md#62-occurrence-details).
194+
A structure which supports definition of arbitrary properties, including nested objects, similar to the `evaluation context` and object-typed flag values.
195+
196+
See [tracking event details](./sections/06-tracking.md#62-tracking-event-details), [evaluation context](#evaluation-context).

0 commit comments

Comments
 (0)