- Install dependencies:
npm i
- Start:
npm start
Target Node.js SDK allows you to send a trace token that will be used by Target edge to generate execution traces. These traces can then be exposed in the page context, so Chrome extensions or other tools could display trace details.
The current sample looks for trace token in a query string parameter named authorization
and the trace data is
placed into a JavaScript object named window.___target_traces
.
In order to generate a trace token please follow these steps:
- Login to Experience Cloud
- Launch the Target UI
- In Target UI top navigation bar select
Setup
- Next, from the left navigation bar select
Implementation
- At the bottom of the page you should find
Debugger Tools
settings - Click on the
Generate Authentication Token
button
Once you have the trace token and the sample app is running to see everything in action you should open: http://localhost:3000?authorization=YOUR_TRACE_TOKEN
NOTE: make sure to replace YOUR_TRACE_TOKEN
with the appropriate token value.