Itā€™s most useful if you would like to offer your users a way to setup/sync their network from their account settings page.

The ā€œFind introā€ button automatically triggers the sync network experience when no paths are found.

1

Pre-requisites

Initiate the JS SDK

Copy the snippet below and add it within theĀ <head>Ā tag The unique user identifier should be unique - such as an email, or an internal ID. This is required for you to later on be able to cancel users from being added to your upcoming bill.

<script>
 (function(){var w=window;var d=document;var v=w.Village||{};d.head.appendChild(Object.assign(d.createElement("style"),{textContent:'[village-paths-availability="found"],[village-paths-availability="not-found"]{display:none}'}));v.q=v.q||[];v._call=function(method,args){v.q.push([method,args])};v.init=function(){v._call("init",arguments)};v.identify=function(){v._call("identify",arguments)};w.Village=v;var l=function(){var s=d.createElement("script");s.type="text/javascript";s.async=true;s.src="https://js.village.do";var x=d.getElementsByTagName("script")[0];x.parentNode.insertBefore(s,x)};if(w.Village.loaded)return;if(w.attachEvent){w.attachEvent("onload",l)}else{w.addEventListener("load",l,false)}w.Village.loaded=true})();
	Village.init('VILLAGE_PUBLIC_KEY');
	Village.identify('YOUR_UNIQUE_USER_IDENTIFIER'); // Less secure
	//Village.authorize('USER_TOKEN'); Coming soon
</script>
2

Add sync buttom

Embed the sync network module

Copy the snippet below and add it within theĀ <head>Ā tag The unique user identifier should be unique - such as an email, or an internal ID. This is required for you to later on be able to cancel users from being added to your upcoming bill.

<button village-module="sync">Sync network</button>