1.2.2 • Published 9 months ago

@attacksimulator/events v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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/events@1.2.2/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

NameTypeDescription
apiKeystringThe key required to access our api. You can get it by contacting our support team.
eventsstring[]Set the events to watch. Leave empty to watch all available events. The default value is [].
debugbooleanSet debugging true of false. The default value is false.
shouldRedirectbooleanSpecify whether the page should redirect after click or submit events. The default value is true.
redirectUrlstringSet the redirect url after affecting events have been triggered. The default value is https://tips.attacksimulator.com.
sourcestringSet the source of the events. Supported values are LP or LP_EDU. The default value is LP.

Available events

NameTypeDescription
attachment_openedinternalThe 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_clickeduser+redirectThe 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_eventuserThe event gets triggered when a user clicks on a link that does point to a file.
file_openedinternalThe 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_filleduserThe event gets triggered whenever a user types something in a input field.
page_loadedinternalThe events triggers automatically whenever the page is loaded.
page_readinternalTHe event gets triggered automatically whenever a user stays on the page for at least 3 minutes. This event is useful for educational pages.
form_submitteduser + redirectThe events is triggered when a user submits a form. After this event is sent, the webpage will redirect to redirectUrl.
mic_acceptedmanual + redirectThe 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_acceptedmanual + redirectThe 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_acceptedmanual + redirectThe 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_acceptedmanual + redirectThe 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_acceptedmanual + redirectThe 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.
1.2.0

9 months ago

1.1.0

10 months ago

1.2.2

9 months ago

1.2.1

9 months ago

1.0.13

1 year ago

1.0.11

1 year ago

1.0.12

1 year ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.10

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago