This library is an A/B testing wrapper over the existing Game Analytics library, providing typing support and default values.
To get started with the Game Analytics AB Service, you must initialise GameAnalytics the usual way, and then construct a new GameAnalyticsABService.
import { GameAnalytics } from "@rbxts/gameanalytics";
GameAnalytics.initialize({
gameKey: "GAME-KEY",
secretKey: "SECRET-KEY",
build: "1.0.0",
});
new GameAnalyticsABService<"music" | "ad-location">(
GameAnalytics,
{
music: "Bossa Me (a)",
"ad-location": "top-left",
},
(player, values) => {
// do something with the loaded values
},
);
npm install @rbxts/gameanalytics
npm install @rbxts/gameanalytics-ab-service
gameanalytics-ab-service is available under the MIT license. See the LICENSE.md file for more info.