Any resources on using UTM codes with Plasmic?

Hi there, are there any resources about using utm codes with plasmic? I’m looking into a custom signup component that would save the utm code of the url it’s used on for lead attribution . Thanks!

Hi @military_condor, are you creating a code component? In that case, your code can introspect the UTM params from window.location

yup, that would be the plan!

thank you

No need for nextjs useRouter ?

Oh, depends on where you’re reading this from - I was assuming this was in a signup form submit event handler or some such, but if you need it to execute server side / during SSR, then you’ll want to reach for useRouter instead

(since window will be undefined)