Socket
Book a DemoInstallSign in
Socket

office-addin-usage-data

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

office-addin-usage-data

Provides infrastructure to send usage data events and exceptions.

2.0.3
latest
Source
npmnpm
Version published
Weekly downloads
159K
-7.12%
Maintainers
1
Weekly downloads
 
Created

What is office-addin-usage-data?

The office-addin-usage-data npm package is designed to help developers collect and manage usage data for Office Add-ins. It provides tools for logging telemetry data, handling errors, and tracking user interactions to improve the quality and performance of Office Add-ins.

What are office-addin-usage-data's main functionalities?

Logging Telemetry Data

This feature allows developers to log telemetry data for specific events within their Office Add-in. The code sample demonstrates how to create a telemetry object and send a success event with custom properties.

const usageData = require('office-addin-usage-data');
const telemetry = new usageData.OfficeAddinUsageData('my-app-name', 'my-app-version');
telemetry.sendUsageDataSuccessEvent('eventName', { property1: 'value1', property2: 'value2' });

Error Handling

This feature provides a way to handle errors by sending exception data to the telemetry service. The code sample shows how to catch an error and send it as an exception event.

const usageData = require('office-addin-usage-data');
const telemetry = new usageData.OfficeAddinUsageData('my-app-name', 'my-app-version');
try {
  // Code that might throw an error
} catch (error) {
  telemetry.sendUsageDataException('errorEvent', error);
}

Tracking User Interactions

Developers can track user interactions, such as button clicks, to understand how users are interacting with their add-in. The code sample demonstrates sending a success event when a button is clicked.

const usageData = require('office-addin-usage-data');
const telemetry = new usageData.OfficeAddinUsageData('my-app-name', 'my-app-version');
telemetry.sendUsageDataSuccessEvent('buttonClick', { buttonName: 'submit' });

Other packages similar to office-addin-usage-data

Keywords

Office

FAQs

Package last updated on 03 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.