@tdcerhverv/react-utils
v0.4.1
Published
React utils from tdc
Downloads
7
Readme
React utils from TDC
Installation
npm i @tdcerhverv/react-utils
Usabilla
import { UsabillaWidget } from '@tdcerhverv/react-utils';
function SomeComp() {
return (
<div>
<SomeOtherComp />
<UsabillaWidget
usabillaId="8765432"
widgetId="123456"
/>
<div>
)
}
if more information is need the category, subCategory and item can be added
import { UsabillaWidget } from '@tdcerhverv/react-utils';
function SomeComp() {
return (
<div>
<SomeOtherComp />
<UsabillaWidget
usabillaId="8765432"
widgetId="123456"
category="test"
subCategory="page 1"
item="function 1"
/>
<div>
)
}
This is the props that the widget accepts.
type UsabillaWidget = {
widgetId: string;
usabillaId: string;
category?: string;
subCategory?: string;
item?: string;
};
Google Tag Manager
import { gtmPush } from '@tdcerhverv/react-utils';
gtmPush({
category: '',
action: '',
event: '',
value: '',
label: ''
});