Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
silesky committed Aug 7, 2023
1 parent a301151 commit 3ea76ad
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions examples/with-consent-next-js/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,25 @@ export default function Home() {
<main>
<div>
<h1>Consent w/ Segment Analytics</h1>

<div>
<h2>Enabled ✅</h2>
<pre>{JSON.stringify(groups.enabled, undefined, 2)}</pre>

<h2>Disabled / Not Configured ❌</h2>
<pre>{JSON.stringify(groups.disabled, undefined, 2)}</pre>
</div>
<br />
<br />
<button
onClick={() =>
analytics.track('hello world').then((ctx) => {
setContext(ctx)
})
}
>
Click to track event
Send track event
</button>
<div>
<h2>Enabled ✅</h2>
<pre>{JSON.stringify(groups.enabled, undefined, 2)}</pre>

<h2>Disabled / Not Configured ❌</h2>
<pre>{JSON.stringify(groups.disabled, undefined, 2)}</pre>
</div>
{ctx.event?.context && (
<>
<h2>Track Context Payload</h2>
Expand Down

0 comments on commit 3ea76ad

Please sign in to comment.