Skip to content

Commit e558c8a

Browse files
authored
Merge pull request #354 from segmentio/repo-sync
repo sync
2 parents 36bd439 + 512d7a7 commit e558c8a

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/config-api/fql.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ Given the following JSON object:
1919
"context": {
2020
"library": {
2121
"name": "analytics.js",
22-
"version": "1.0",
22+
"version": "1.0"
2323
}
24+
},
25+
"properties": {
26+
"features": ["discounts", "dark-mode"]
2427
}
2528
}
2629
```
@@ -38,6 +41,8 @@ The following FQL statements will evaluate as follows:
3841
| `match( context.library.version, '2.*' )` | `false` |
3942
| `type = 'track' and ( event = 'Click' or match( event, 'Button *' ) )` | `true` |
4043
| `!contains( context.library.name, 'js' )` | `false` |
44+
| `'dark-mode' in properties.features` | `true` |
45+
| `'blink' in properties.features` | `false` |
4146

4247
## Field Paths
4348

@@ -100,6 +105,7 @@ If your field name has a character not in the set of `{a-z A-Z 0-9 _ -}`, you mu
100105
| `>=` | `number` | `number` | `true` if the left side is greater than or equal to the right side. |
101106
| `<` | `number` | `number` | `true` if the left side is less than the right side. |
102107
| `<=` | `number` | `number` | `true` if the left side is less than or equal to the right side. |
108+
| `in` | `string`, `number`, `bool`, or `null` | `list` | `true` if the left side is contained in the list of values. |
103109

104110
## Subexpressions
105111

@@ -109,6 +115,7 @@ You can use parentheses to group subexpressions for more complex "and / or" logi
109115
| -------------------------------------------------------------------------------------------------------------- |
110116
| `type = 'track' and ( event = 'Click' or match( 'Button *', event ) )` |
111117
| `( type = 'track' or type = 'identify' ) and ( properties.enabled or match( traits.email, '*@company.com' ) )` |
118+
| `!( type in ['track', 'identify'] )` |
112119

113120
## Functions
114121

@@ -134,7 +141,7 @@ For example, you can write `length( userId ) > 0` instead of `typeof( userId ) =
134141

135142
### `match( string, pattern )`
136143

137-
The `match( string, pattern )` function uses "glob" matching to return `true` if the given string fully matches a given pattern. Glob patterns are case sensitive. If you only need to determine if a string contains a given substring, you should use `contains()`.
144+
The `match( string, pattern )` function uses "glob" matching to return `true` if the given string fully matches a given pattern. Glob patterns are case sensitive. If you only need to determine if a string contains another string, you should use `contains()`.
138145

139146
| Pattern | Summary |
140147
| ------- | ---------------------------------------------------------------------------------------------------------------------- |

src/guides/filtering-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You can use the `integrations` JSON object as part of your Segment payloads to c
2525
"page": {
2626
"title": "Analytics Academy",
2727
"url": "https://segment.com/academy/"
28-
},
28+
}
2929
},
3030
"integrations": {
3131
"All": true,

0 commit comments

Comments
 (0)