1.0.6 • Published 11 months ago

@fabioespindola/tellme v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

Tell me

Tell me is a very simple way to get to know more about your user behavior. Know every click in buttons, links or any HTML elements. Register the events and send to storage.

Installation

npm install @fabioespindola/tellme

Usage

import attachClick from '@fabioespindola/tellme'

const selectors = [ '.myClass1', '.myClass2', '#myId1', '#myId2', ... ]
const url = 'api endpoint'
const headers = {
    header1: value1,
    header2: value2
}

attachClick(selectors, url, headers)

You should add a aria-label to identify the element

<button id='#myId1' aria-label='My button'>My button</button>

Then you should receive in your backend something like this

{ 
    event: "click", 
    type: "button", 
    label: "My button",
    url: "element page url", 
    datetime: "2023-06-23 09:00:49" 
}
1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago