2.0.2 • Published 2 months ago

@elbwalker/tagger v2.0.2

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

Tagger

Made to be used with @elbwalker/walkerOS.

More detailed information and examples can be found in the documentation.

🤓 Usage

Start by installing the tagger with npm:

npm i --save @elbwalker/tagger

Import, instantiate and use the tagger

import Tagger from '@elbwalker/tagger';

const tagger = Tagger();
tagger.entity('promotion'); // { "data-elb": "promotion" }

tagger.action('visible', 'impression'); // { "data-elbaction": "visible:impression" }
tagger.action({ click: 'add', load: 'view' }); // { "data-elbaction": "click:add;load:view" }

tagger.property('promo', 'text', 'hey'); // { "data-elb-promo": "text:hey" }
tagger.property('promo', { id: '1', text: 'hey' }); // { "data-elb-e": "id:1;text:hey" }

tagger.context('test', 'a'); // { "data-elbcontext": "test:a" }
tagger.context({ test: 'a', pos: 'hero' }); // { "data-elbcontext": "test:a;pos:hero" }

tagger.globals('language', 'en'); // { "data-elbglobals": "language:en" }
tagger.globals({ language: 'de', pagegroup: 'shop' }); // { "data-elbglobals": "language:de;pagegroup:shop" }

Contribute

Feel free to contribute by submitting an issue, starting a discussion or getting in contact.

2.0.2

2 months ago

2.0.2-next.0

2 months ago

2.0.1

4 months ago

2.0.0

4 months ago

1.0.2

11 months ago

1.0.1

1 year ago

1.0.0

2 years ago