Installing ZenLocator on your custom site
ZenLocator can be easily installed on any website with a few simple steps.
How to install the embed code
If you're new to ZenLocator, you’ll need to set up an account first:
- First, enter your email address on ZenLocator homepage and create your account.
- By default, we have created your first app (which includes several widgets like Search, Map, etc).
On your ZenLocator dashboard:
- Click the Embed Map button at the top of your dashboard, under your app name.
- Click Copy Code, which will copy your embed code to your clipboard.
- Now follow the steps to embed your widget on your site.
You can also find your embed code by following these steps:
- Pick the right app, and navigate to the widget you'd like to install on your site, for example: Map > Settings > Embed Widget, or any of the widget sections (Directory, Locator, Carousel and Search)
- Under Embed, if you're planning on installing more than one widget on your site, select "I want to show multiple widgets on multiple pages" if it hasn't already been selected. Otherwise, select "I want to show only this widget".
- Now follow the steps to embed your widget on your site.
How does the embed work?
There are usually two tags to install:
- The JavaScript tag that includes the code for the widgets.
- The
<div>
tag that's the container for your widget (where your widget will show).
You can include these tags together wherever you want the widget to appear on your site. The advantage is the code will load only on this page, and not on any of your other pages unnecessarily.
However, if you're planning on integrating multiple widgets (maybe even on multiple pages), we recommend placing the JavaScript code in the footer of your website and showing the <div>
code only wherever you want the widgets to appear.
Please note that you need to include the JavaScript tag only once! It's the same for all of your apps and widgets.
If you run into any issues setting up your widget, please contact us and we will gladly take a look at it with you!