1.0.16 • Published 3 years ago
verser-dcl-sdk v1.0.16
verser-dcl-sdk
NPM Package that provides a quick way to send events from Decentraland Scenes to Verser dashboard.
This must be published to a valid NPM repository. eg. https://www.npmjs.com/package/verser-dcl-sdk
Publishing to NPM Steps
Create a NPM Account: https://www.npmjs.com/
Login to your NPM account via CLI:
npm login- Provide a unique name and set the version on your
package.json, then publish the package to NPM via CLI:
npm publishUsage on Decentraland Scene
When developing your Decentraland Scene, you will need to install this package by running the following CLI
npm i verser-dcl-sdkthen on your game initialization script eg. game.ts you will import addVerseEventListeners function from the package:
import addVerseEventListeners from "verser-dcl-sdk";or in case of any restrictions you can import the function using relative path:
import addVerseEventListeners from "../node_modules/verser-dcl-sdk/index";then need to add the following script replacing the VERSER_CUSTOMER_ID and VERSER_SNIPPET_ID with the values provided by the platform:
executeTask(async () => { addVerseEventListeners('VERSER_CUSTOMER_ID','VERSER_SNIPPET_ID')});