Skip to end of metadata
Go to start of metadata


 

Getting Started

The Tracking WebView SDK is a JavaScript library that allow you to create tags in your HTML pages.

For an appropriate use of the library, please follow these steps:

  • create your WebViews with the `A4SWebView` component
    • if you are working on iOS, click here
    • if you are working on Android, click here
  • Then, refer to our support team to establish the connection of your application to the library

 

Using the library inside your WebView

The use of the library to create new tags implies the following aspects:

  • the library is automatically injected and initialized in your page
  • it can be manipulated through the `_A4ST` JavaScript variable
  • this variable will be represented as an array in which you will push some commands
  • a command is basically an array containing options about the tag you want to create

 

Working with the library
Remember that the library is injected in the `window`
How to create a new command :

 

Creating your tags

 

_trackEvent

#optiontypedescription
1idnumber 
2detailsobject 
for example

 

_updateDeviceInfo

 #optiontypedescription
1keystring 
2value*You can provide a 'now()' string that will create a 'YYYY-MM-DD hh:mm:ss' string date
for example

 

_trackLead

 #optiontypedescription
1labelstring 
2value*You can provide a 'now()' string that will create a 'YYYY-MM-DD hh:mm:ss' string date
for example

 

_setView

 #optiontypedescription
1viewstring 
for example

 

_trackAddToCart

 #optiontypedescription
1idstring 
2itemIdstring 
3labelstring 
4pricenumber 
5quantitynumber 
6categorystring 
7currencystring 
for example

 

_trackPurchase

 #optiontypedescription
1idstring 
2pricenumberAs you have provided some items, you can provide a 'calculated()' string for this option that will make the sum of each price's item
3currencystring 
4itemsarrayOptional, you can provide an array of items (see the format below)
#item optiontype
1idstring
2labelstring
3pricenumber
4quantitynumber
5categorystring
for example
  • No labels