Open
Description
Is there an existing issue for this?
- I have searched the existing issues
SDK Version
Source: https://docs.developers.optimizely.com/feature-experimentation/docs/usetrackevent-react
When you look at the example code it says:
const [track] = useTrackEvent()
// Define event properties
const properties = {
"category": "shoes",
"color": "red"
};
// Define tags including event properties
const tags = {
"revenue": 10000,
"value": 100.00,
"$opt_event_properties": properties
};
// Track event with tags
track("signup-clicked", tags);
However, if you add that code to a TypeScript project, utilizing the useTrackEvent
hook, it expects $opt_event_properties: properties
to be a string.

Current Behavior
Code is throwing a TypeScript error.
Expected Behavior
Code should not throw a TypeScript error.
Steps To Reproduce
- Paste the example code from https://docs.developers.optimizely.com/feature-experimentation/docs/usetrackevent-react into a TypeScript project.
- See error
React Framework
NextJS 13.5.6
Browsers impacted
No response
Link
No response
Logs
No response
Severity
No response
Workaround/Solution
No response
Recent Change
No response
Conflicts
No response