Integrating with Google Maps API
OptimizeUrgency includes a maps option which allows you to show the location (approximate city/town location) of your buyers in the alert boxes like this:
These maps use the Google Maps API - which allows an automatic lookup of the user location and shows this in the preview alert window.
Follow the steps in this guide to configure the Google Maps API
Note: In order to use rhe Google Maps API, you will need a billing account setup with Google. Google provide $200USD credit per month for use of their API, so as long as your usage does not exceed this (which works out around 100,000 location lookups) then you will not be charged. You can monitor your billing within the Google billing dashboard
Step 1: Locate the Maps API window
Open the OptimizeUrgency dashboard, and at the top of the dashboard page you'll see a "Settings" link. Opening this will open the input field for your Google API key:
Clicking Settings will open the Settings window where you can input the Google API or follow the link to start the process of creating your API key:
Inside this window, click "this link" to go to Google to start the API creation process
Step 2: Create a project inside the Google Cloud Platform
Once you open the Google Cloud platform, you'll be presented with an option to choose a project or create a new project. Unless you have a project you would already like to use, select "Create a project" and then click "Continue".
Step 3: Create your API key
On the following screen, you'll see an option higlighted to create a new API key in the Google Cloud platform. You will need to click the "x" to close this alert, then click the "Create Credentials" button to create a new API key
You'll now be presented with a new API key - you can click copy to copy this API Key and go back to your OptimizePress site and paste this key into the field provided:
Go back to your OptimizePress site and paste this key into the field provided inside the OptimizeUrgency settings screen:
Step 4: Enable the Google Static Maps API
Now we need to search for "maps static api" in the search box provided. You should see results that look like this
Click on the Maps Static API option in the search results and you will be presented with a screen which looks like this:
If it is not already enabled, click the blue "Enable" button to enable this in your account.
You may already see this enabled, if so, your screen should look like below:
Step 5: Enable billing for your Google Cloud Platform project
Now that you have enabled the correct API services in the Google Cloud Platform, you might think everything is done. However, your maps will still not show until you have enabled billing for your project.
A note on Google Billing: As mentioned above, this will not be charged unless you exceed the $200USD inclusive API credit. Please note if you are using other Google API services this will be shared so always monitor your Google account for usage stats. If you are only using the Google Maps API - $200 USD means around 100,000 address/location lookups. Additional lookups (at time of writing) are $2 per 1,000 lookups.
To enable billing for your project, first go to this link:
You should be taken to a screen that looks like this:
Click on your project that you are using with the Google Maps APi and you will be presented with a screen to connect your Google Billing account to that project. If you do not have a Google billing accoumt, you'll need to create one first and add payment information (credit card information) to allow for charges should they be due.
Once you select the billing account - click "Set Account" to set this for your project.
You should now be all set!
Go back to your website and clear any cache, and then test your alerts (you can test with the pre-loaded alerts if you wish) to ensure that Google Maps API is working.
Troubleshooting Google Maps Integration
Please check the following to ensure your Google Maps integration is working:
- Check you have entered your API inside the OptimizeUrgency platform dashboard
- Ensure you have connected a billing account to the project used for generating your API. If you do not connnect billing, your Maps will not work