How to save User's country code in Bubble Part 1
In this Bubble.io tutorial video we demonstrate how to use the IP Geolocation plugin by Zeroqode to save a user's country code to the database in the correct format to use with the Page2API web scraper.
Unlock the power of geolocation: Learn how to save users' country codes in Bubble and enhance your web scraping capabilities!
Master IP geolocation in Bubble: Discover how to automatically detect and store user locations for smarter API endpoints and personalized experiences.
Elevate your Bubble app: Learn to capture and utilize user country codes, opening up new possibilities for geo-targeting and localization.
Installing the IP Geolocation Plugin
In this Bubble.io tutorial, I'm going to show you how to take your users' IP address and generate a country code for the location of the IP address and then save that into your Bubble app. We need a plugin to do that, and I've got this plugin here IP geolocation by Zeroqode. To get the data from it, I need to add the elements to my page so you can test that it's working.
Adding Elements to Display IP Information
I'll add a text box and then I just refer to the element and I can get all these different pieces of information. I'm going for country code because this is part of a two-video series showing how to insert a country code into the Page2API so that you can web scrape from the perspective of another country like viewing the website that you're scraping content from as if you're viewing them from basically any country around the world.
Configuring the IP Geolocation Element
So I'm going to take the country code because that's a two-digit representation of the country. If I click here I just need to change this to GEO to IP. If I look at the documentation it says response IP geolocation but I think they've updated their plugin. I just checked and the field I need to use is text. If I click preview there we go I am in the UK or Great Britain as a country code so it gives back GB.
Saving the Country Code to the Database
Now how do I save that into my database? I'm just going to add a button in and this could be part of like an onboarding workflow. Assuming that I've already registered the user, I can go account make changes to current user change another field and then I can add in country code and it's just text.
Referencing the Plugin Element
Then I refer to the item. Remember the text on the page is just so I can check that it's working so I can refer back to the plugin element that I've added to the page country code. I know looking at the Page2API documentation that it expects the country code values to be lowercase so I'll just go more and then lowercase.
Saving the Country Code to the Current User
So by clicking this button I'm saving that two-digit country code in lowercase to my current user. I'm now going to stop this video and I'll be recording right away a video showing how to input this into the API connector workflow for Page2API.
Get the Complete Bundle for Just $99
Access 3 courses, 390+ tutorials, and a vibrant community to support every step of your app-building journey.
Start building with total confidence
No more delays. With 30+ hours of expert content, you’ll have the insights needed to build effectively.
Find every solution in one place
No more searching across platforms for tutorials. Our bundle has everything you need, with 390+ videos covering every feature and technique.
Dive deep into every detail
Get beyond the basics with comprehensive, in-depth courses & no code tutorials that empower you to create a feature-rich, professional app.
Save over 70%!
Valued at $80
Valued at $85
Valued at $30
Valued at $110
Valued at $45
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
Have questions?
We have answers!
Find answers to common questions about our membership plans, programs, and more.
We're here to help you launch your no code SaaS. Reach out to the team and we'll double check our vast library for useful content. We'll advise you on how we'd tackle the same problem and there's a good chance we'll record the video to help the wider community.
As a Planet No Code member, you'll receive a discount on our Bubble coaching sessions. Monthly members receive a 10% discount, while Annual members receive a 17.5% discount. To redeem your discount, simply log into your account and book a coaching session through our platform.
Our 8-week intensive mentorship program is designed to provide personalized guidance and support to help you accelerate your startup journey. You'll be matched with a startup expert who will work with you one-on-one to set goals, overcome challenges, and make rapid progress.
To apply for the Mastery Program, simply click the "Request Invitation" button on our pricing page and fill out the application form. Our team will review your application and schedule a call with you to discuss your goals and determine if the program is a good fit for your needs.
We accept all major credit cards, including Visa, Mastercard, American Express, and Discover.
While we don't offer a free trial, we do provide a 14-day money-back guarantee. If you're not completely satisfied with your membership within the first 14 days, simply contact our support team, and we'll issue a full refund.