Generate an API key for Google Maps
Split allows you to show a live version of your store's map on your website's contact page. For this purpose, you need to have a working Google Maps API Key. Here are the required steps to get one:
- Visit the API Console, at this link: https://console.developers.google.com/
- Log into your gmail account. If you don't have an account, you'll need to create one.
- Hit the Create project list button, and the create a new project by clicking the + button in the top right corner.
- Write a Project name, agree with the terms and then hit Create.
- Hit the Enable API button.
- Search for Google Maps Javascript API and select it.
- Enable it for your current project.
- Search for Google Maps Geocoding API and select it.
- Enable it for your current project.
- After the API's are enabled, click the Create credentials button.
- Choose to create an API Key.
- Last window will be one which will show you the Google Maps API key that you can now copy and paste in the proper setting of your store.
Restrict API access to only your store
Your API key is a unique identifier to your map section. To prevent others from using it, we recommend securing it by restricting access to only your domain.
To restrict your API key:
- Go to the Credentials page of the Google API Console.
- Select your project from the menu.
- Click the Edit button on the API key you generated.
- Click HTTP referrers (web sites) and add any domain your store will be using, including your
.myshopify.com
domain. For example, you should include bothmyCustomDomain.com/*
andshop1.myshopify.com/*
as valid domains. - Click Save. Your API key should now be restricted to your domain.