@absmartly/javascript-client 中文文档教程
A/B Smartly Client
A/B Smartly -A/B Smartly 收集器的 JavaScript 客户端.
注意:此包实现了 A/B Smartly 收集器服务的低级接口,旨在成为更高级别 SDK 的构建块。 如果您正在寻找更高级别的 SDK,请查看以下内容之一:
Compatibility
A/B Smartly Javascript Client 是一个用于 Node.js(CommonJS 和 ES6)和浏览器 (UMD) 的同构库。
它在 Node.js 版本 6.x 和 npm 3.x 或更高版本上受支持。
它支持 IE 10+ 和所有其他主要浏览器。
注意:IE 10 本身不支持 Promises。 如果你的目标是 IE 10,你必须包含像 es6-promise 或 rsvp。
Installation
npm
npm install @absmartly/javascript-client --save
Import in your Javascript application
const absmartly = require('@absmartly/javascript-client');
// OR with ES6 modules:
import absmartly from '@absmartly/javascript-client';
Directly in the browser
您可以通过 unpkg.com 在您的 HTML 代码中直接包含优化的预构建包。
只需将以下代码添加到您的 head
部分即可包含最新发布的版本。
<script src="https://unpkg.com/@absmartly/javascript-client/dist/absmartly.min.js"></script>
Getting Started
请在尝试以下代码之前按照安装说明进行操作:
Initialization
// somewhere in your application initialization code
const client = new absmartly.Client({
endpoint: 'https://sandbox.absmartly.io/v1',
apiKey: process.env.ABSMARTLY_API_KEY,
environment: process.env.NODE_ENV,
application: process.env.APPLICATION_NAME,
});
About A/B Smartly
A/B Smartly 是最先进的领先供应商,on-前提,全堆栈实验平台,适用于希望自信地部署功能的工程和产品团队,尽快开发它们。 A/B Smartly 的实时分析可帮助工程和产品团队确保新功能将改善客户体验,而不会破坏或降低性能和/或业务指标。
Have a look at our growing list of clients and SDKs:
A/B Smartly Client
A/B Smartly - JavaScript client for the A/B Smartly Collector.
Note: This package implements a low-level interface to the A/B Smartly Collector Service and is intended to be a building block for higher-level SDKs. If you are looking for the higher-level SDKs, please have a look at one of the following:
Compatibility
The A/B Smartly Javascript Client is an isomorphic library for Node.js (CommonJS and ES6) and browsers (UMD).
It's supported on Node.js version 6.x and npm 3.x or later.
It's supported on IE 10+ and all the other major browsers.
Note: IE 10 does not natively support Promises. If you target IE 10, you must include a polyfill like es6-promise or rsvp.
Installation
npm
npm install @absmartly/javascript-client --save
Import in your Javascript application
const absmartly = require('@absmartly/javascript-client');
// OR with ES6 modules:
import absmartly from '@absmartly/javascript-client';
Directly in the browser
You can include an optimized and pre-built package directly in your HTML code through unpkg.com.
Simply add the following code to your head
section to include the latest published version.
<script src="https://unpkg.com/@absmartly/javascript-client/dist/absmartly.min.js"></script>
Getting Started
Please follow the installation instructions before trying the following code:
Initialization
// somewhere in your application initialization code
const client = new absmartly.Client({
endpoint: 'https://sandbox.absmartly.io/v1',
apiKey: process.env.ABSMARTLY_API_KEY,
environment: process.env.NODE_ENV,
application: process.env.APPLICATION_NAME,
});
About A/B Smartly
A/B Smartly is the leading provider of state-of-the-art, on-premises, full-stack experimentation platforms for engineering and product teams that want to confidently deploy features as fast as they can develop them. A/B Smartly's real-time analytics helps engineering and product teams ensure that new features will improve the customer experience without breaking or degrading performance and/or business metrics.