Once this library is imported into your project you can then use the sendPingAnalytic function to send an analytic event from your asset which can be used to track page views or other events that need to be tracked.
The sendPingAnalytic function takes in 3 parameters - identifier, subcomponent, subsubcomponent
This library and analytics function will work on both MI App and MI Desktop.
itSam.sendPingAnalytic("/product"); itSam.sendPingAnalytic("/product", "ACTION", "Save"); itSam.sendPingAnalytic("/product", "SEARCH", "myterm"); <!-- Copyright (c) 2021 The Interact Technology Group. THE CODE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. All rights reserved. —>
To ‘ping’ a page/view as being shown, call the function with a path/identifier.
The sub-component and subsub-component are optional (pass "" if not used) which allows for more granular tracking data to be collected.
NOTE: Due to limitations in the browser in a device, this cannot be called too rapidly, as the app will not capture the event as it may only be passed the last "URL" when multiple "URL's" are fired in a short fraction of time. If you must capture events rapidly we recommend queuing the requests are firing them with a finite delay between events.