Applied User Data Collection and Analysis Using JavaScript and PHP
eBook - ePub

Applied User Data Collection and Analysis Using JavaScript and PHP

Kyle Goslin, Markus Hofmann

Share book
  1. 336 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Applied User Data Collection and Analysis Using JavaScript and PHP

Kyle Goslin, Markus Hofmann

Book details
Book preview
Table of contents
Citations

About This Book

Applied User Data Collection and Analysis Using JavaScript and PHP is designed to provide the technical skills and competency to gather a wide range of user data from web applications in both active and passive methods. This is done by providing the reader with real-world examples of how a variety of different JavaScript- and PHP-based libraries can be used to gather data using custom feedback forms and embedded data gathering tools.

Once data has been gathered, this book explores the process of working with numerical data, text analysis, visualization approaches, statistics, and rolling out developed applications to both data analysts and users alike.Using the collected data, this book aims to provide a deeper understanding of user behavior and interests, allowing application developers to further enhance web-application development.

Key Features:

  • Complete real-world examples of gathering data from users and web environments


  • Offers readers the fundamentals of text analysis using JavaScript and PHP


  • Allows the user to understand and harness JavaScript data-visualization tools


  • Integration of new and existing data sources into a single, bespoke web-based analysis environment

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Applied User Data Collection and Analysis Using JavaScript and PHP an online PDF/ePUB?
Yes, you can access Applied User Data Collection and Analysis Using JavaScript and PHP by Kyle Goslin, Markus Hofmann in PDF and/or ePUB format, as well as other popular books in Computer Science & Computer Graphics. We have over one million books available in our catalogue for you to explore.

Information

Year
2021
ISBN
9781000374438
Edition
1

CHAPTER 1

Introduction

1.1 Introduction

Understanding a user’s needs and requirements is one of the main driving forces for any business. Collected data provides insights into how users feel about a given feature or topic and how they work on a day to day basis. This data can be gathered directly from users by providing simple questions and allowing the user to select an option from a predefined list, or to enter their own text-based responses.
Although asking a user for their opinion is possible, other methods can be used to gather data. Data can be collected indirectly through a web application by monitoring the interactions and behaviors a user has with it. The collected data can be processed to generate meaningful statistics and visualizations, providing both overviews and a deep-dive analysis of user interests and needs.
Each different data type, such as numerical data and text data, comes with methods of identifying importance and relevance. Both quantitative and qualitative analysis approaches can be used to extract these insights. In this book, we explore the different methods available for data collection, extraction, and analysis. This book aims to describe the many different approaches that can be taken with the aim to capture as much data as possible for analysis.
To provide a complete solution, the process of developing and deploying the developed solutions on a cloud-based server is explored with additional features such as report generation and delivery. An emphasis in this book is placed on the diversity of technologies exposing you to many different alternatives for data collection and analysis, providing you with the tools needed to develop a well-rounded solution.

1.2 Who This Book Is Aimed At

This book is aimed at web application developers who have some knowledge with the basics of JavaScript and PHP. This book builds on this basic knowledge and provides complete working examples that can easily be deployed into existing web applications.
This book is not directed toward people who do not have these skills, however, the knowledge about gathering data and generating insights are still valuable to gain an understanding of what tools and approaches are available if you do have developers to implement these solutions.

1.3 Technologies Used

In this book, a clear line between the technologies used throughout the chapters can be seen. On the client-side, e.g., in the web browser of the user, HTML and JavaScript will be used. On the server-side, PHP version 7.41 running on an Apache version 2.4 web server2 is used to do the bulk of the processing of the data, e.g., storing the information in a database and calculating statistics.
JavaScript is used as it provides the ability to manipulate and present data to the user without the need to redirect the user to multiple different pages. Using the collected data, visualizations will be created using JavaScript and HTML/CSS libraries. As JavaScript is a browser-based programming language implemented by individual web browser vendors, each of the browsers can have slight variations as to how it is interpreted. To side-step the problem of cross-browser compatibility issues, we will utilize JavaScript libraries wherever possible. The main JavaScript library that is used in this book is jQuery version 3.5.3
jQuery offers all the features that plain JavaScript has to offer, but all of the cross-browser issues have been thoroughly tested. Any new user to JavaScript often searches for code and finds browser-specific JavaScript code, considering this the correct solution. But code that may work correctly in one browser may not work on a different browser. Much to the developer’s frustration, even a different version of the same browser may also cause issues when the sample code is run. For this reason, we will use libraries extensively to fast track the development process.
To aid the visualization process, JavaScript-based libraries such as D3.js, Charts.js, and Google Charts are explored as they offer high-quality interactive visualizations. A focus is placed on the diversity of the libraries used in this book to provide a learning experience with different code bases.
1 https:/​/​www.php.net
2 https:/​/​www.apache.org
3 https:/​/​www.jquery.com
As all data collected needs to be retrieved for analysis, different data sources will be explored. Examples of this include utilizing comma-separated value (CSV) files, simple text files, JSON files, and database tables. In this book, the core database we will be using is the MySQL 8 community edition4 database as it is free, widely used, and integrates with PHP.
Although many different web browsers exist, Google Chrome5 version 80 was used during the development of the examples in this book.

1.4 Variations of Data

In this section, we will begin the process of breaking down the two approaches that can be taken to gather data from users. The first approach is active data collection, whereby the user is directly polled to provide answers or judgments. The second approach is passive data collection, whereby all of the data is gathered in the background without the need for user intervention. Examples of this include gathering data by listening to the browser environment. As a user navigates a web application, data can be recorded and saved for future retrieval.
Data can come in both structured and unstructured formats. An example of structured data is a database table that contains the user level of interest graded by the user between one and ten. The only possible variations of this data are the numbers between the ranges provided to the user. An additional component of this structured data is the processing speed, as little to no processing is required since the data is already in the desired format. To gain insights from this data, simple metrics such as the total, sum, and average can be used.
Structured data is in contrast to unstructured data that may be held in any number of different storage locations such as a text file, CSV file, or a database table. This form of data inherently has no structure to it. This adds complexity to processing the data as it is not just a simple calculation or predefined column in a table. To extract meaning from this data, additional processing such as identifying relevance and importance must be performed.
4 https:/​/​dev.mysql.com/​downloads/​mysql
5 https:/​/​www.google.com/​chrome
After processing, additional steps can be performed to identify the relationships between individual pieces of data. Examples of this include the use of charts to visualize these relationships. As the quantity of data grows during the interactions with an application, methods of filtering the data to provide focus on the crucial trends can be performed.

1.4.1 Active Data

Active data is any data that has been directly provided by a user. This data can be collected by asking a user their opinion about a topic to a brief “yes” or “no” answer to a question. Often users do not have the time to give a wealth of information outlining how they feel about a particular page or subject. This often leads developers to consider the best time or approach to take to pose questions to the user.
The disadvantage of active data is that there is a cost associated with interacting with users. At the end of any process, many users simply do not want to leave any form of data and consider the process an annoyance. Example of active data include:
  • Number of times a user has shared or “liked” a particular page on a website through a social media interface.
  • Leaving a rating for a product on a website.
  • Answering the questions in a survey.
  • Setting custom options on a website.

1.4.2 Passive Data

Passive data is data collected in the background of an application without any user intervention. Although the user is navigating through content and selecting different articles of interest, at no time is the user ever formally requested to provide input about what they are currently viewing or their opinions. Passive data collection approaches include:
  • Length of time a user remains on a section of web application or viewing a page.
  • Statistics about popular pages that a user is viewing.
  • Amount of time a user has spent inside of a particular collection of pages that are all directly related to each other.
  • Demographic of a user.
  • Click times when users are interacting...

Table of contents