Update February 18, 2016: You can now create a store locator widget interface in the Admin. Just login to get started!
Store locators are often the most visited page on a company’s website, but not always the easiest to find. Now you can integrate a Bullseye Store Locator Widget at the bottom of your website or webpage to make it even easier for your customers to quickly find the store location nearest to them.
Check out the live demo on the bottom of this page…
Some basic knowledge of HTML, CSS and jQuery are needed, so pass this guide along to your friendly web developer.
We’ve posted the code at GitHub where you can download the latest version. Download store locator widget code now. Save it to your local machine so you can modify the code to point to your Bullseye account and to customize styles.
You’ll need your Search API Key and Client ID. These can be found by logging into your Bullseye Locations account, click Settings on the top right, then click Account.
Open bullseyewidget.js in your HTML editor and modify lines 12 and 13 to include your Search API Key and Client ID.
You can also update the values below to further customize your widget.
Upload bullseyewidget.js and bullseyewidget_style.css to a directory on your website and make a note of the path.
Update the URL references in the code below to point to the location of the bullseyewidget.js file and the bullseyewidget_style.css file. Then add the following code to the page or pages where you want the widget to appear. You will only need to include the jQuery code if you don’t already have a reference to it on your page.
Make sure to include the jQuery and CSS code below in the <head>:
<script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js”></script>
<link href=”path/to/bullseyewidget_style.css” rel=”stylesheet” type=”text/css”>
Above the closing </body> tag, include the code below for the Bullseye container div, “bullseyewidget.js”, and jQueryUI cdn script:
<div id=”bullseye-widget2″></div>
<script src=”https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js”></script>
<script src=”path/to/bullseyewidget.js”></script>
HINT: If you’re using a CMS, be aware that the head code will most likely come from a template file and that file will differ from one CMS to another. If you want the widget to appear throughout the site, you’ll want to add the widget code to a page template file.
Color and styling edits can be made to “bullseyewidget_style.css” to match your brand. Of course, you’ll need to download, edit and re-upload.
Pretty simple, right?! Go ahead and try this store locator widget on your website, then share your examples with us on Twitter using #bullseyewidget.