Skip to content

Commit

Permalink
analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushKun committed Aug 20, 2024
1 parent df55133 commit 5f04837
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions next_app/src/pages/codecell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ export default function CodeCell() {
const userId = localStorage.getItem('user-id') || "user-" + uuidv4();
localStorage.setItem('user-id', userId);

//this is in an iframe, get the parent websites domain and path
const body = {
...data, userId,
domain: window.location.hostname,
path: window.location.pathname
domain: document.referrer,
path: window.parent.location.pathname
};

await fetch(`${BASE}/analytics`, {
Expand Down

0 comments on commit 5f04837

Please sign in to comment.