sdk changes
This commit is contained in:
@@ -7,8 +7,8 @@ export default function Document() {
|
||||
<script
|
||||
async
|
||||
src="/op.js"
|
||||
data-url="https://api.openpanel.dev"
|
||||
data-client-id="301c6dc1-424c-4bc3-9886-a8beab09b615"
|
||||
data-url="http://localhost:3333"
|
||||
data-client-id="0acce97f-1126-4439-b7ee-5d384e2fc94b"
|
||||
data-track-screen-views="1"
|
||||
data-track-outgoing-links="1"
|
||||
/>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { mixan } from '@/analytics';
|
||||
import Link from 'next/link';
|
||||
|
||||
export default function Test() {
|
||||
@@ -7,22 +6,33 @@ export default function Test() {
|
||||
<Link href="/">Home</Link>
|
||||
<button
|
||||
onClick={() => {
|
||||
mixan.setUser({
|
||||
// @ts-expect-error
|
||||
window.openpanel.setUser({
|
||||
first_name: 'John',
|
||||
});
|
||||
mixan.setUser({
|
||||
last_name: 'Doe',
|
||||
});
|
||||
mixan.setUser({
|
||||
email: 'john.doe@gmail.com',
|
||||
});
|
||||
mixan.setUser({
|
||||
id: '1234',
|
||||
});
|
||||
}}
|
||||
>
|
||||
Set user
|
||||
</button>
|
||||
<button
|
||||
onClick={() => {
|
||||
// @ts-expect-error
|
||||
window.openpanel.increment('app_open', 1);
|
||||
}}
|
||||
>
|
||||
Increment
|
||||
</button>
|
||||
<button
|
||||
onClick={() => {
|
||||
// @ts-expect-error
|
||||
window.openpanel.decrement('app_open', 1);
|
||||
}}
|
||||
>
|
||||
Decrement
|
||||
</button>
|
||||
<button
|
||||
onClick={() => {
|
||||
localStorage.clear();
|
||||
@@ -44,7 +54,8 @@ export default function Test() {
|
||||
</button>
|
||||
<button
|
||||
onClick={() => {
|
||||
mixan.clear();
|
||||
// @ts-expect-error
|
||||
window.openpanel.clear();
|
||||
}}
|
||||
>
|
||||
Logout
|
||||
|
||||
Reference in New Issue
Block a user