@nexly/react-web 0.15.4 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +3 -3
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -32,7 +32,7 @@ function App() {
32
32
  const client = useNexlyClient()
33
33
  if (!client) return <p>Add credentials</p>
34
34
  return (
35
- <button type="button" onClick={() => client.event({ name: 'cta', type: 'conversion' })}>
35
+ <button type="button" onClick={() => client.customEvent('cta_clicked', { placement: 'hero' })}>
36
36
  Track
37
37
  </button>
38
38
  )
@@ -50,7 +50,7 @@ function App() {
50
50
  Mark any element with `data-nexly-ignore` to skip auto-`click` and auto-`input_focus` events for it (and its descendants). Use it on elements where you already emit your own `event(...)` to avoid semantic duplicates:
51
51
 
52
52
  ```tsx
53
- <button data-nexly-ignore onClick={() => client?.event({ name: 'signup_clicked', type: 'custom' })}>
53
+ <button data-nexly-ignore onClick={() => client?.customEvent('signup_clicked')}>
54
54
  Sign up
55
55
  </button>
56
56
  ```
@@ -66,7 +66,7 @@ The provider initializes a global singleton. Access it anywhere without hooks:
66
66
  ```ts
67
67
  import { Nexly } from '@nexly/react-web'
68
68
 
69
- Nexly.getInstance()?.event({ name: 'cta_click', type: 'conversion' })
69
+ Nexly.getInstance()?.customEvent('cta_click', { placement: 'hero' })
70
70
  ```
71
71
 
72
72
  ## Next.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexly/react-web",
3
- "version": "0.15.4",
3
+ "version": "0.16.0",
4
4
  "description": "React bindings for Nexly (@nexly/web): provider, client hook, engagement, optional auto pageview",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -39,7 +39,7 @@
39
39
  "react": "^18.0.0 || ^19.0.0"
40
40
  },
41
41
  "dependencies": {
42
- "@nexly/web": "0.15.4"
42
+ "@nexly/web": "0.16.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/react": "^19.2.14",