Skip to content

Commit 6ef1216

Browse files
committed
Track geocoded IP
1 parent 6bb67c2 commit 6ef1216

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pages/index.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ export function Card ({ title, icon, children, style }) {
9090
)
9191
}
9292

93-
export default function Home({ headers }) {
94-
console.log({headers});
93+
export default function Home({ formParams }) {
9594
const [modal, setModal] = useState(false);
9695
const handleFormEnter = () => {
9796
if (regex.test(email) && !loading) {
@@ -190,7 +189,7 @@ export default function Home({ headers }) {
190189
<h1 style={{
191190
marginBottom: "40px"
192191
}}>Coming Soon</h1>
193-
<FilloutStandardEmbed filloutId="6FWy549Jjgus" dynamicResize />
192+
<FilloutStandardEmbed filloutId="6FWy549Jjgus" dynamicResize parameters={formParams} />
194193
</div>
195194
</div>
196195
</>
@@ -203,7 +202,11 @@ export function getServerSideProps(context) {
203202

204203
return {
205204
props: {
206-
headers
205+
formParams: {
206+
est_lat: headers['x-vercel-ip-latitude'],
207+
est_long: headers['x-vercel-ip-longitude'],
208+
est_city: headers['x-vercel-ip-city']
209+
}
207210
},
208211
}
209212
}

0 commit comments

Comments
 (0)