This guide explains how to set up a Google Maps account to manage free usage of Google Maps on your Studentpad/Localpad website and screenshots/directions were current at the time of writing.
WHAT YOU NEED TO KNOW BEFORE YOU START:
- To complete this you will need:
- A valid credit/debit card for your organisation
- A valid Google email account you can access (we’ve included guidance on how to sign up for a Google email account here if you don’t already have one)
- A valid telephone number that can receive text messages (new google accounts only)
- You will be signing up to Google the Google cloud platform, please read their terms and conditions of use when you sign up and ensure you are happy with them before completing the process of signing up
- Although Google will give you $200 credit for map usage, the credit/debit card provided could be charged for additional usage outside of your allowance
- Google makes regular changes to its website and user interface so some parts of the website may look slightly different when you’re following this guide but the instructions will still help you to set up and configure your account.
In this guide we will explain how to:
- set up your account
- add limits on your account to help prevent over spending
- secure your API key against unauthorised use.
1 – Register for a Google account
If your organisation doesn’t already have a Google account you will need to create one. This is an account for your organisation so please use an appropriate email address (e.g. yourorganisationname@gmail.com) and password. Remember you will be signing up for a google account here so Pad Group will be unable to assist you with any password resets or if you lose your account details. 2. Click the “Get Started” button
3. On the next screen you will need to tick all 3 options
4. When you click Continue, Google will prompt you to sign in or create an account. If your organisation already has a Google account, you can simply log in with that account. If not click the “Create account” button in the bottom left of the form
If you need to create a new Google account you need to supply first name, last name, click on the “Create a gmail account instead” link and think of a new email address, then type in your new password and then again to confirm it, then accept Google’s terms.
2 – Configuring your account
After signing up for a new Google account or logging in to an existing one, you will be prompted with the following screen to get started
You can call your project anything you like, however I would recommend a useful name such as Studentpad Maps or Localpad Maps.
Name your project, and click “Yes” if you agree to the terms of service. Once done the next button will become blue and available to be clicked, click it to go to the next page.
The next step is to enable billing on your account, you must do this in order to get the $200 free credit from google. To get started Click “Create Billing Account”
Complete the form to set up your billing account, you will have to agree to the terms of service again here. Note the $300 credit mentioned here is additional credit that can be used on Google services.
After clicking “Agree and continue” you will go to step 2 where you will need to provide credit card details.
Once complete you will be taken to your Google cloud dashboard. You should immediately see a popup asking you to enable your APIs
Click Next to enable the previously selected APIs, this will take a second and then give you another popup with Your API Key. This is the key you will need to provide to us in order to use your map services
3 – Securing your key
As it is initially set up, your key can be used by any piece of software or site. This makes getting started easy, however it does mean your key could be used by somebody else without your knowledge and cause charges on your account. This is why we cannot leave it in this way, we need to restrict the usage of the key so that it can only be used by services you require.
Follow the steps below to restrict your key use.
1. Click on the “API Console” link on the bottom of the popup,
b) then click on the word “API key”
2. You should now be on a screen that looks like this:
As you can see there are no application restrictions, this is what we are going to change.
3. You will need to create a “HTTP referrers (web sites)” restriction for your key, so click that option on the bottom of the form. When you do this, you will see a new section appear underneath
4. In the space provided you should enter all of the URLs you need the key to work. This will be your Studentpad or Localpad website URL e.g. https://www.londonstudentpad.co.uk/ as well as the control site URLs. Press the enter key on your keyboard after typing each URL. a) Here is a list of additional URLs you will need to enter along with your website URL
5. After entering all of the URLs you should have something that looks like this (with your URL instead of londonstudentpad.com)
If you have this and are happy with your list you need to click the blue “Save” button to save your restrictions.
6. If you wish, you can also add additional restrictions on the services that we can call using our software, to do this you will need to click back into the API key and select the “API restrictions tab”. This step is optional as you have now secured your key to only allow the required URLs to access it.
7. If you decide to add restrictions this is the minimum required for our software to function correctly:
Again if you add to this section please ensure you press the save button
8. That’s it, your key is now secure. You can confirm this if the warning triangle has disappeared from your API key list.
4 – Adding spending restrictions
If you wanted to ensure that you definitely do not spend any money on Google Maps and you only wish to use the free credit Google provides, then you will need to add spending restrictions to the API key. This is an optional step, because if you do reach your limit the Google services will stop working on your Studentpad/Localpad website.
You can also set up Budget Alerts which will warn you when you are getting to certain percentages of your usage. The below steps will show you how to do each
Creating a Budget alert for your $200 free credit
2. Click on the billing account name to enter the settings for that account
3. On the left-hand menu click “Budgets & alerts”
4. Click the create new budget button when prompted
5. On this screen you can set a budget spend for the whole project, this is inclusive of your credit use. To complete this simply give your budget a name, and enter $200 in the amount field (highlighted in screenshot below), the rest will be filled in automatically
6. Once you are happy, press the save button to create your budget.
NOTE, setting a budget will not stop you from over spending it will just send out alerts.
Setting Usage Limits
Setting usage limits will help to prevent you from going over your free credit. To set these up follow the steps below. Unfortunately google has not made this a quick process so it is a little repetitive to set up the restrictions.
We will show you in the following steps how to set up restrictions for the Dynamic map loads as this is the highest use item in the API. You can repeat the below steps on all of the API functions to restrict everything if you want to.
2) on the bottom of that screen you will see a full list of all your enabled google API services, for this restriction we are going to use “Maps JavaScript API”
3) Find “Maps JavaScript API” in your list and click on the Gear icon on the right-hand side of that item as highlighted below
4) This will take you to the settings for the selected item, from here on the left-hand menu select “Quotas”
5) Quotas are used to prevent over use of your API, these are the default settings
6) Depending on how busy you are expecting your site to be you can adjust the limits accordingly. For most users the following will be sufficient
7) Remember to account for launch days or busy days with your quotas, e.g. on a launch day you may have 500 students each load the map 5 times which would take up 2500 map loads for the day.
8) Once changed, you are all done.
NOTE: Please remember that none of the methods provided can prevent you from going over your free credit. To prevent this, it will require monitoring the usage with billing alerts along with setting quotas.