Insert following snippet of code as is to the head of your page
<script> (function (a, u, d, i, n, e, t) { a['MainAppsAudiNet'] = n; a[n] = a[n] || function () { (a[n].qu=a[n].qu || []).push(arguments) }, a[n].ti = 1 * new Date(), a[n].us = {}, a[n].ua = {}, a[n].ip = {}; e = u.createElement(d),t = u.getElementsByTagName(d)[0]; e.async = 1;e.src = i;t.parentNode.insertBefore(e, t); })(window, document, 'script', 'https://analytics.mainapps.com/connect/audinet.min.js', 'maa'); </script>
Ask us for a valid token (trackerID) then call following method of our data layer once at the beginning
maa('auth', trackerID, options);
The options is just an optional object which can contain one or all the values as shown below in the example
{ logLevel: 0, sessionMinutes: 60, googleOneTap: false, googleOneTapAuto: false, googOneTapSelectorID: 'exampleID', googleOneTapEventID: null } // logLevel one of following. 0 => disabled, 1 => only errors, 2 => all events, 3 => verbose, 4 => debug. Default: 0 // sessionMinutes duration in minutes of each session. Default: 60 // googleOneTap true or false, enable Google One Tap authentication with which you can register and associate to the events the visitors name, surname, email, picture and Google ID. Default: false // googleOneTapAuto true or false, enables Google One Tap auto authentication, if possible and if the googleOneTap property is true. Default: false // googOneTapSelectorID the ID of the DOM element where the script will inject the login element if the googleOneTap property is true. (eg. <div id="exampleID"></div>). By default inherits heigth of his container with 40px max-heigth and has absolute position in top 0, right 0 // googleOneTapEventID specific event to trigger Google One Tap box request. If omitted and if the googleOneTap property is true, it is triggered on auth event. Default: null
Use this method to track as many events as you want
maa('event', actionID, objectTypeID, objectID, param1, param2);
All event method params are optional, please refer to the tables below for a correct use of the actionID and objectTypeID values. ObjectID may be the unique ID of the element you are tracking, param1 and param2 are generic purpose fields where you can register what you want
Optionally you can register a CustomerID which will be sent automatically at each call to the same session event method. This can be useful for associating an event to a specific customer in your database. When session lasts you should re-register customer event.
maa('customer', customerID);
Optionally you can check if function exists before call its methods. If you are using a script load blocker, such as cookie consent, you should check the existance of function before using it, insted to do that in explicit way by checking if it is defined ( eg. typeof(maa) !== 'undefined') you can use following embedded way to prevent errors.
<script> function isf(func) { var args = Array.prototype.slice.call(arguments,1); if (typeof (window[func]) === 'function') { window[func].apply(window, args); } } </script>
maa('auth', trackerID, options);isf('maa', 'auth', trackerID, options);maa('event', actionID, objectTypeID, objectID, param1, param2);isf('maa', 'event', actionID, objectTypeID, objectID, param1, param2);maa('customer', customerID);isf('maa', 'customer', customerID);
Thanks to the non-specificity of the isf() funtion, you can also use it to check that other than MainApps AudiNet tracking systems are not blocked!
ID | Action | Description | Status |
---|---|---|---|
1 | (not set) | Not specified | |
2 | GenericSearch | Generic search on the site passing the term searched as a parameter | |
3 | ItRequiresDetailed | Requires product / service / category / brand detail sheet | |
4 | ImageInteraction | Interaction with product / service / category / brand images | |
5 | SizeSelection | Size selection | |
6 | ColorSelection | Color Selection | |
7 | ConfigurationSelection | Product / service configuration selection | deprecated |
8 | QuantityChange | Quantity Selection | |
9 | ProductInCart | Product in the cart from the product detail sheet | |
10 | ProductInCartQuick | Product in cart from the listing card | |
11 | RemoveFromCart | Removes from cart | |
12 | ContinueShopping | Continue shopping | |
13 | ConcludeOrder | Proceed to purchase | |
14 | PurchasingWithoutRegistration | Purchase without registration | |
15 | PurchasingWithRegistration | Purchase with registration | |
16 | Login | Login | |
17 | ForgotPassword | Forgot password | |
18 | CreateAccount | Create account | |
19 | AcceptPrivacyPolicy | Acceptance of privacy conditions | |
20 | MyAccountButton | Access to the account management area | |
21 | HomePageButton | Access to the Home page via logo button | |
22 | MyCartButton | Access to the shopping cart | |
23 | WhoWeArePage | Access page About us | |
24 | ConditionsOfSalePage | Access page Conditions of sale | |
25 | CustomerServicePage | Access customer support page | |
26 | PrivacyPolicyPage | Access to the Privacy Policy page | |
27 | SocialFacebookButton | Click on the Facebook social button | deprecated |
28 | SocialInstagramButton | Click on the Instagram social button | deprecated |
29 | SocialGooglePlusButton | Click on the Google Plus social button> | deprecated |
30 | SocialPinterestButton | Click on the Pinterest social button | deprecated |
31 | SocialTwitterButton | Click on the Twitter social button | deprecated |
32 | Social11Button | Click on the generic 1 social button | deprecated |
33 | Social12Button | Click on the generic 2 social button | deprecated |
34 | Social13Button | Click on the generic 3 social button | deprecated |
35 | Social14Button | Click on the generic 4 social button | deprecated |
36 | Social15Button | Click on the generic 5 social button | deprecated |
37 | CustomerDataForward | Click on the Next button after entering the customer's personal data | deprecated |
38 | CustomerDataBack | Click on the Back button after entering the customer's personal data | deprecated |
39 | ShippingDataForward | Click on the Next button after entering the shipping information | deprecated |
40 | ShippingDataBack | Click on the Back button after entering the shipping information | deprecated |
41 | MainPayment | Pay with MainPayment or PayRider | |
42 | PayPal | Pay with PayPal | |
43 | AgreeTermsAndConditions | Acceptance Conditions of sale | |
44 | CouponEntry | Coupon typing | |
45 | FidelityCardEntry | Typing Loyalty Card | |
46 | NewUser | New user | |
47 | Empty1 | Generic 1 | deprecated |
48 | Empty2 | Generic 2 | deprecated |
49 | Empty3 | Generic 3 | deprecated |
50 | Landing | Landing | |
51 | Mag_Step1 | Mag - Welcome Page and Search | |
52 | Mag_Step2 | Mag - Choice of Additional Services | |
53 | Mag_Step3 | Mag - User Form Filling | |
54 | Mag_Step4 | Mag - Reservation Summary and Confirm | |
55 | Mag_Step5 | Mag - Reservation Summary after Booking | |
56 | Mag_Step11 | Mag - Quotation Confirmed | |
57 | Mag_Step | Mag - Not Tracked Step | |
58 | Mag_ShowRealDetails | Mag - Show Real Details |
ID | ObjectType | Description | Status |
---|---|---|---|
1 | (not set) | Not specified | |
2 | Product | Product | |
3 | Category | Category | |
4 | Novelty | Novelty | |
5 | Clearance | Clearance | |
6 | Promotions | Promotions | |
7 | Brand | Brand | |
8 | Resource | Resource |