15 Configure Data Collection and Privacy Controls

Application Performance Monitoring allows you to configure privacy settings and control data collection.

This chapter talks about the tools within Application Performance Monitoring that enable you to comply with local regulations with respect to privacy, data collection and processing and storage of data. Using these tools you can control how much of your users’ personal data is collected, stored and viewed, thereby complying to the applicable legal requirements.

Configure Do Not Track Settings

Administrators can provide an option to users of Application Performance Monitoring to disable tracking.

Users of an application are tracked in order to provide useful and reliable reporting. But users may want to opt out of tracking for reasons of privacy or due to regulatory requirements. Administrators can provide a choice, and enable users to choose their privacy settings.
Administrators can add applicable business logic in their application so that the value of the parameter window.apmeum.obs can be determined as per the user’s preference. Through this parameter, APM allows the user to choose to be or not to be tracked. If the user chooses not to be tracked, the value of the parameter window.apmeum.obs will be set to 0.
The following is an example of how the parameter window.apmeum.obs can be used in the apmeum.js file.
<html>
    <head>
             
            // function to get cookie
            function getCookie(cname) {
                var name = cname + "=";
                var decodedCookie = decodeURIComponent(document.cookie);
                var ca = decodedCookie.split(';');
                for(var i = 0; i <ca.length; i++) {
                    var c = ca[i];
                    while (c.charAt(0) == ' ') {
                        c = c.substring(1);
                    }
                    if (c.indexOf(name) == 0) {
                        return c.substring(name.length, c.length);
                    }
                }
                return "";
            }
 
            //this method is for recording user's preference of being tracked
            function setObsTriggered(doNotTrack, exdays/*expires day*/){
                if(doNotTrack != undefined){
                    if(doNotTrack == true){
                        window.apmeum = window.apmeum || {};
                        apmeum.obs = 0;
                    }
                    //calculate expires date
                    var d = new Date();
                    d.setTime(d.getTime() + (exdays*24*60*60*1000));
                    var expires = "expires="+ d.toUTCString();
 
                    //set path=/ so that all pages under a web project can access the doNotTrack cookie if avaiable
                    document.cookie = "doNotTrack=" + doNotTrack + ";" + expires +  "; path=/;"
                }
                 
            }
             
            function doNotTrackPrompt(){
                var r = confirm("Can I track your behaviour data for helpping improve user experience?");
                if (r == true) {                   
                    setObsTriggered(true,DEFAULT_EXPIRE_DAY_FOR_DO_NOT_TRACK);
                } else {
                    setObsTriggered(false,DEFAULT_EXPIRE_DAY_FOR_DO_NOT_TRACK);
                }
            }
             
             
            function isDoNotTrackSet(){
                 //check if cookie doNotTrack is available to adjust observation state(i.e. apmeum.obs) for current page
                var doNotTrack = getCookie("doNotTrack");
                 
                if(doNotTrack != undefined && doNotTrack != ''){
                    if(doNotTrack == 'true'){
                        window.apmeum = window.apmeum || {};
                        apmeum.obs = 0;                   
                    }
                    return true;
                }
                else return false;               
            }
             
            $(document).ready(function(){  
                if(!isDoNotTrackSet()) //if doNotTrack is not set yet, a prompt will be popped up.
                    doNotTrackPrompt();
            });
             
        </script>
     
    </head>
     
    <body>
        <!--
            Client's page.
        -->
    </body>
</html>

In the above scenario, if the main page of a website records a Do Not Track, the same value is carried forward to its child pages too. If a user chooses Do Not Track for www.samplepage.com, the same preference would be applied for www.samplepage.com/cart.

Configure Privacy Settings

Administrators can provide an option to users of Application Performance Monitoring to configure privacy preferences.

You can configure privacy settings in Application Performance Monitoring to comply with legal requirements.
  1. From the APM left navigation menu, select APM Admin and select Privacy Settings .
  2. Select the privacy option as per your requirement:
  3. Personal Identifiable Information: To avoid storing any personally identifiable information (PII), you can select if you want to store private information such as full URLs, page titles and click names as per your requirement. Note that this does not affect Web Application data.
  4. Click Save.