React AT internet
This package enables you to use the AT Tracker to set up tagging using the AT Internet smarttag library.
Installation
Make sure you have initialised the AT Internet JavaScript Tracker and selected the desired plugins from within the Tag Composer interface.
Include the following script tag in the head of your React App. Replace the YOURSITEID
with your site id.
<script src="//tag.aticdn.net/YOURSITEID/smarttag.js"></script>
Install the package
npm install @bnnvara/react-at-internet --save
Basic usage
Import
import tag from '@bnnvara/react-at-internet';
Page tagging
componentDidMount() {
tag.sendPage({
name: 'page_name',
level2: 1,
})
}
for more information about the tags you can use check the Tagging examples
Click tagging
tag.sendClick({
name: 'page_name',
level2: 2
})