Welcome To Our Customer Service Portal


How do I push data from my external source into a Nanorep answer?

1. You need to add the Nanorep custom variables API to your page, as part of your Nanorep widget script, below the /*API HERE*/ comment - as follows:

_nRepData["customParams"] =

{

Variable1Name: Variable1Value,

Variable2Name: Variable2Value

...

};

Below is an example for the API implementation:

<!--do not modify this script -->
<div class='Nanorep_loadingData' id='NanorepProxyContainer' style='position:absolute;top:-500px;left:0px;'></div>
<script type='text/javascript'>var _nRepData = _nRepData || []; _nRepData['kb'] = '30423589'; _nRepData['float'] = {account: 'uopeople', cdcVersion: 3, cdcFrame: '', scriptVersion: '2.29.3.4'}
/* API here */;

_nRepData["customParams"] =

{

   AvailableColors: "Red, Blue, Orange",

    Weight: 500

};

(function(){var windowLoadFunc = function(){var _nRepData = window._nRepData || [];_nRepData['windowLoaded'] = true;if (typeof(_nRepData['windowOnload']) === 'function') _nRepData['windowOnload']();};if (window.attachEvent)window.attachEvent('onload', windowLoadFunc);else if (window.addEventListener)window.addEventListener('load', windowLoadFunc, false);var sc = document.createElement('script');sc.type = 'text/javascript';sc.async = true;sc.defer = true;sc.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'my.Nanorep.com/widget/scripts/float.js';var _head = document.getElementsByTagName('head')[0];_head.appendChild(sc);})();
</script>

 

2. Create an answer that calls the variable.

Make sure to use the {{variable_name}}  placeholder to show the value of the variable.

Below is an example for calling the value of the "weight" variable.

Where {{weight}} is the placeholder that represents the variable obtained by the API.