File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ "use client"
2+
3+ export default function HoneypotPage ( ) {
4+ return (
5+ < div className = "min-h-screen bg-white dark:bg-black text-black dark:text-white p-8 flex flex-col items-center text-center" >
6+ < img className = "mb-8" src = "https://upload.wikimedia.org/wikipedia/en/1/10/Winniethepooh.png"
7+ />
8+ < p >
9+ Thanks for finding the honey pot! We're trying to find the proportion
10+ of visitors who are bots, and your IP address has been recorded. If you
11+ would like to have your data removed from the study email bob28@cornell.edu
12+ with your request and I'll address it promptly!
13+ </ p >
14+ </ div >
15+ ) ;
16+ }
Original file line number Diff line number Diff line change @@ -136,6 +136,11 @@ export default function RootLayout({
136136 >
137137 Get Involved
138138 </ Link >
139+ < Link
140+ href = "/honeypot"
141+ className = "display: none"
142+ >
143+ </ Link >
139144 </ nav >
140145 </ div >
141146
@@ -303,6 +308,14 @@ export default function RootLayout({
303308 </ div >
304309 </ div >
305310 </ footer >
311+ { pathname === '/honeypot' && (
312+ < Script id = "honeypot-event" strategy = "afterInteractive" >
313+ { `fetch('https://api.ipify.org?format=json')
314+ .then(response=>response.json())
315+ .then(data=>gtag('event','honeypot_triggered',{user_ip:data.ip}))
316+ .catch(()=>gtag('event','honeypot_triggered',{user_ip:'unknown'}));` }
317+ </ Script >
318+ ) }
306319 </ body >
307320 </ html >
308321 ) ;
You can’t perform that action at this time.
0 commit comments