npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@elevista.ai/client

v0.0.4

Published

The `@elevista.ai/client` package is a JavaScript library designed to simplify the process of capturing user interactions and events on your website. It works seamlessly with Elevista's AI-powered Audience Growth Platform to provide deeper insights into u

Downloads

3

Readme

Introduction

The @elevista.ai/client package is a JavaScript library designed to simplify the process of capturing user interactions and events on your website. It works seamlessly with Elevista's AI-powered Audience Growth Platform to provide deeper insights into user behavior and enhance your content's reach and conversion rates.

Benefits of Using @elevista.ai/client

  • Capture Comprehensive User Events: Go beyond the limitations of the core Elevista script by capturing complex events like signup, signin, sign out, and more.
  • Streamlined Integration: Easily integrate with your existing Elevista setup.
  • Enhanced Reporting: Generate detailed reports on website user interactions, enabling data-driven decisions and content optimization.
  • Enhanced Developer Experience: The package is written in TypeScript, providing type safety and improved code maintainability for developers.

Installation

  • Install the package using npm or yarn:
npm install @elevista.ai/client

yarn add @elevista.ai/client
  • Import the library into your JavaScript code:
import ElevistaAIClient from '@elevista.ai/client';

Sending Events

@elevista.ai/client offers two flexible methods to send user interaction events:

  • Caution: Both methods require the Elevista core script to be loaded. Make sure to add the following script tag to your HTML file before using the @elevista.ai/client package:
 <script src="https://core.elevista.ai/core/tracking/index.js" crossorigin="*"></script>

Method 1: Utilizing the Global elevistaAIClient Object (No Installation Required)

  1. Window Object Check: Ensure the elevistaAIClient object exists on the global window object before proceeding.
if (typeof window !== 'undefined' && window.elevistaAIClient) {
    // Proceed with sending events
} else {
    console.warn(`
        Elevista Ai Client is not available.
        Please ensure the Elevista core script is loaded.
        <script src="https://core.elevista.ai/core/tracking/index.js" crossorigin="*"></script>
    `)
}
  1. Sending Events: Use the events object provided by the elevistaAIClient object to send event functions:
window.elevistaAIClient.events.signup({
    userId: '12345', // Optional user ID
    email: '[email protected]' // Optional user email
});

Method 2: Using the Installed Package (@elevista.ai/client)

  1. Import Section:
import ElevistaAIClient from '@elevista.ai/client';
  1. Sending Events: Use the events object provided by the elevistaAIClient object to send event functions:
elevistaAIClient.events.signup({
    userId: '12345', // Optional user ID
    email: '[email protected]' // Optional user email
});

Supported Events (with Input Types)

common events typically include: | Event Name | Description | Input Type (where applicable) | | :-------- | :---------: | ----------: | | signup | User signs up for an account | {userId?:string, email?:string} | | signin | User signs in to an account | {userId?:string, email?:string} | | signOut | User signs out of an account | | | setVideoInformation | Page of a video | { downloadURL: string; title: string; lengthInSecond: number; description?: string;} |

Additional Considerations

  • Refer to Elevista's documentation or support for granular control over event properties.
  • Implement error handling mechanisms to gracefully manage potential issues.

Conclusion

The @elevista.ai/client package empowers you to capture a wider range of user interactions and events on your website. This enriched data, combined with Elevista's AI platform, equips you with valuable user insights to optimize your content strategy for better engagement and conversions. Additionally, the TypeScript foundation provides a more robust and maintainable codebase for developers.