Data collection JavaScript API reference