Page Overlay Embedding
Sections:
- Installing on every pages of your Sqaurespace website
- Installing only on a specific page of your website
- Using custom buttons/links to open your widget
First find your embed code by visiting the map in your Closeby dashboard and clicking the "Install Map" button in the top right corner.
Once you see the installation instructions, copy your map's embed code under "Javascript Installation". It should look like this:
Installing on every pages of your Sqaurespace website
To do this, go to Settings > Advanced > Code Injection. From here, paste your embed code from Closeby into the HEADER text field:
That's it! Just save the changes and you'll see the launcher in the corner of the page.
Installing only on a specific page of your website
NOTE: If the template you are using has ajax loading, there may be issues with your widget showing up properly. In this case, you will need to either install the widget site-wide or disable ajax. More info here
If you'd like to have the Closeby widget only show up on specific pages, you can do so by adding the embed code on each page.
To do this, go to your Pages and click the gear icon for the page you want to add it to.
Then, in the Advanced tab, paste your embed code in the text field labeled 'PAGE HEADER CODE INJECTION':
Save the changes and you will see the launcher appear for only that page. Woo!
Using custom buttons/links to open your widget
If you'd like to open your widget from buttons within your page, you can easily do so as if you were creating links to external websites. Instead of using a link (ie `http:example.com`), though, you simply add `javascript:closeby-open` as the website URL.
If you choose to set up custom links to open your widget, you can also choose to disable the default launcher by going to your Map Theming page and disabling it in your theme settings ("Edit Theme").
Page Embed
To embed your map within your Squarespace website (instead of using the overlay style), go to your Map installation page.
Copy the code for "Page Embed Installation".
Then, on your Squarespace website, create a "Code Block" content section and paste your embed code. That's it!
Need help?
If you have any questions, please feel free to reach out to our team at support@closeby.zendesk.com