Skip to content

Commit 1d76cf1

Browse files
committed
wip
1 parent 5e31ec3 commit 1d76cf1

File tree

1 file changed

+18
-24
lines changed

1 file changed

+18
-24
lines changed

packages/signals/signals/README.md

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,8 @@ analytics.load({
5555
})
5656

5757
```
58-
### Extending / Emitting Custom Signals
59-
```ts
60-
import { signalsPlugin } from './analytics' // assuming you exported your plugin instance.
61-
62-
signalsPlugin.addSignal({ someData: 'foo' })
63-
64-
// emits a signal with the following shape
65-
{
66-
type: 'userDefined'
67-
data: { someData: 'foo', ... }
68-
}
69-
```
70-
71-
### Debugging
72-
#### Enable debug mode
73-
Values sent to the signals API are redacted by default.
74-
This adds a local storage key. To disable redaction, add a magic query string:
58+
### Sending and Viewing Signals on Segment.com (Debug mode)
59+
For privacy reasons, **signals are only to Segment.com when debug mode is on**. You must enable debug mode on the client to send and view those signals on segment.com. To enable debug mode on your client
7560
```
7661
https://my-website.com?segment_signals_debug=true
7762
```
@@ -83,20 +68,29 @@ https://my-website.com?segment_signals_debug=false
8368
* This also logs all signals to the js console.
8469

8570
#### Alternative method(s) of enabling debug mode
86-
1. In your JS console:
71+
### Enable debug mode from your JS console:
8772
```js
8873
window.SegmentSignalsPlugin.debug()
8974
```
9075

76+
### Extending / Emitting Custom Signals
77+
```ts
78+
import { signalsPlugin } from './analytics' // assuming you exported your plugin instance.
9179
92-
2. Passed as a setting
93-
```js
94-
const signalsPlugin = new SignalsPlugin({
95-
enableSignalsIngestion: process.env.SEGMENT_SIGNALS_DEBUG === 'true'
96-
})
97-
analytics.register(signalsPlugin)
80+
signalsPlugin.addSignal({ someData: 'foo' })
81+
82+
// emits a signal with the following shape
83+
{
84+
type: 'userDefined'
85+
data: { someData: 'foo', ... }
86+
}
9887
```
9988

89+
### Debugging
90+
Debug mode **MUST** be enabled on the client to VIEW signals on segment.com.
91+
92+
93+
10094
### Advanced
10195

10296
#### Listening to signals

0 commit comments

Comments
 (0)