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

@attacksimulator/events

v1.2.6

Published

This package can be used to enable events collection on a landing page and send them back to ATTACK Simulator.

Downloads

7

Readme

ATTACK Simulator Events

This library helps our clients collect events from their custom landing pages and send them to our API.

Instalation

Events was designed to work both in the browser and in Node.js.

Node.js

To get started with Events in your Node.js project, simply add the dependency with NPM.

npm i @attacksimulator/events --save

Browser

Include the bundle.min.js file in your project.

<script src="path/to/events/bundle.min.js"></script>

CDN

The events package can be included by way of a CDN provider like cdnjs.com, unpkg and jsDelivr ...

<script src="https://cdn.jsdelivr.net/npm/@attacksimulator/[email protected]/dist/bundle.min.js"></script>

Usage

Before running the plugin, make sure you get an api key from our support team.

<script>
const ev = new ATSEvents({ "apiKey": "YOUR_API_KEY"});
ev.listen();
</script>

Options

| Name | Type | Description | |----------------------|------------|---------------------------------------------------------------------------------------------------------------------------| | apiKey | string | The key required to access our api. You can get it by contacting our support team. | | events | string[] | Set the events to watch. Leave empty to watch all available events. The default value is []. | | debug | boolean | Set debugging true of false. The default value is false. | | shouldRedirect | boolean | Specify whether the page should redirect after click or submit events. The default value is true. | | redirectUrl | string | Set the redirect url after affecting events have been triggered. The default value is https://tips.attacksimulator.com. | | source | string | Set the source of the events. Supported values are LP or LP_EDU. The default value is LP. |

Available events

| Name | Type | Description | |---------------------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | attachment_opened | internal | The event gets triggered automatically when an attachment is opened. This requires the url of the host page to have a file_type=attachment query string. | | button_clicked | user+redirect | The event gets triggered when a user clicks on a link that does not point to a file. After this event is sent, the webpage will redirect to redirectUrl. | | download_file_event | user | The event gets triggered when a user clicks on a link that does point to a file. | | file_opened | internal | The event gets triggered automatically when an attachment is opened. This requires the url of the host page to have a file_type=download query string. | | input_filled | user | The event gets triggered whenever a user types something in a input field. | | page_loaded | internal | The events triggers automatically whenever the page is loaded. | | page_read | internal | THe event gets triggered automatically whenever a user stays on the page for at least 3 minutes. This event is useful for educational pages. | | form_submitted | user + redirect | The events is triggered when a user submits a form. After this event is sent, the webpage will redirect to redirectUrl. | | mic_accepted | manual + redirect | The events is triggered manually and should be run after a user accepts the microphone permissions prompt. After this event is sent, the webpage will redirect to redirectUrl. | | webcam_accepted | manual + redirect | The events is triggered manually and should be run after a user accepts the webcam permissions prompt. After this event is sent, the webpage will redirect to redirectUrl. | | location_accepted | manual + redirect | The events is triggered manually and should be run after a user accepts the location permissions prompt. After this event is sent, the webpage will redirect to redirectUrl. | | notification_accepted | manual + redirect | The events is triggered manually and should be run after a user accepts the notifications permissions prompt. After this event is sent, the webpage will redirect to redirectUrl. | | clipboard_accepted | manual + redirect | The events is triggered manually and should be run after a user accepts the clipboard permissions prompt. After this event is sent, the webpage will redirect to redirectUrl. |