The following parameters can be sent in the data object. One or more parameters must be sent
Parameter | Description | Default Value | Data Type | Mandatory |
n | Specifies the Node ID | STRING | NO | |
nn | Specifies the Node Name | STRING | NO | |
nt | Specifies the Node Type | STRING | NO | |
l | Specifies the Link ID | STRING | NO | |
ln | Specifies the Link Name | STRING | NO | |
lt | Specifies the Link Type | STRING | NO |
Example Javascript¶
- This is searching for Node ID "myTestNodeId" and uses the __gaKeywd to match Google keyword against a Link ID
- It will show the fallback number/text if no match is found and will populate the HTML element with ID "phonenumber". See our General Parameters page for more information on VoxReq.resp
- For the search you can use any of the following Magic Functions.
<script type="text/javascript">
var VoxReq = {}; // Initialise empty request object
VoxReq.auth = {"accK":"fe803fbc4629d15aae13ab9fe8c1e187d8c62de9","actK":"fe8c1e187d8c62de9ge803fbc4629d15aae13ab9"}; // Authentication data
VoxReq.data = {"n":"myTestNodeId","ln":"gaKeywd"}; // Data parameters from the table above. gaKeywd is a magic function
VoxReq.resp = {"fallback":"+44FallbackNumber","elementsBy":{"match":"id","element":"phonenumber"}}; // Response data
(function() {
var vox = document.createElement('script'); vox.type = 'text/javascript';
vox.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'www.voxanalytics.com/js/api/vox.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(vox, s);
})();
</script>