# Getting Started With Tracking and the TD Javascript SDK The TD library works by creating an instance per database and sending the data into tables. If you're an administrator, databases are automatically be created for you. Otherwise, you'll need to ask an administrator to create the database and grant you `import only` or `full access` on it, otherwise, you will be unable to send events. You can send as many events as you like. Each event will fire off asynchronously. * [Installing the TD JavaScript Library and Creating the Database](/products/customer-data-platform/integration-hub/streaming/td-javascript-sdk/getting-started-with-tracking-and-the-td-javascript-sdk#installing-the-td-javascript-library-and-creating-the-database) * [Sending Events](/products/customer-data-platform/integration-hub/streaming/td-javascript-sdk/getting-started-with-tracking-and-the-td-javascript-sdk#sending-events) Treasure Data recommends you verify the implementation of any new features or functionality at your site using the Treasure Data JavaScript SDK version 3 before you start using it in production. It manages cookies differently. Be aware when referring to most of these articles that you need to define the suggested event collectors and Treasure Data JavaScript SDK version 3 calls in your solutions.For example, change //cdn.treasuredata.com/sdk/2.5/td.min.js to //cdn.treasuredata.com/sdk/3.0.0/td.min.js. # Installing the TD JavaScript Library and Creating the Database 1. Get your write-only API key. 2. Log in to Treasure Data and go to your profile. The API key should show up right next to your full-access key. 3. Install the library. For example, use: ```bash npm install --save td-js-sdk ``` 1. Initialize using code similar to the following: ```javascript var = new Treasure({ database: '', writeKey: 'your_write_only_key' }); ``` # Sending Events 1. Configure an instance for your database by adding a variable similar to the following: ```javascript var company = new Treasure({...}); ``` 1. Create a data object with the properties you want to send. For example: ```javascript var sale = { itemId: 101, saleId: 10, userId: 1 }; ``` 1. Send the data to a table. For example, send data to a sales table: ```javascript company.addRecord('sales', sale); ```