How Heatmap Tracking Tools can increase website traffic using website analytics for digital publishers?

Most of the media companies are competing in content marketing in the online world and battling with the question, whether their content is faring well than the others. Analytics and metrics give deep insights on number of visits, visitors, duration of a visitor’s visit, the entry and exit points, but misses on the granular data such as the engagement level and interaction on the content page.

To measure the missing connect, publishing companies have moved towards heatmap tracking tools; to understand how people interact with the content on the website. Heatmap is a visual overlay that has the appearance of an infrared display with colour variations indicating high and low levels of activity. These heatmap tracking tools are very useful when preparing website navigation, layout and  in designing user friendly interface.

Heatmaps can measure - click, move and scroll, that means it can track where users have clicked on a page, how far they have scrolled on a page, and have also been used to display the results of eye-tracking movements and these results are displayed in real time.

When used along with other analytical tools, these heat map tracking tools give a good result in optimising website, understanding the aggregated behaviour of site visitors on content,  generating content performance and driving higher conversion rates.

The most popular website heat maps used by media companies are the following:

1. Crazy Egg: Crazy Egg is one of  the most popular heat map tools. It offers click, mouse cursor, and scroll heatmaps. It offers another useful feature called confetti heat map. Confetti heatmap divides the data into traffic sources, enabling the user to figure out where the most profitable traffic is arriving from. The clicks can be separated by a number of variables, such as device, region, or campaign, thus, giving a better insight. WPMU Dev used Crazy Egg’s confetti report to see how their visitors were interacting with content on their product page and identified the important parts of the navigation menu and redesigned the product page. 

Crazy Egg also gives a comparison of mobile versus desktop visitors to see how the two different groups interact with the content. Unlike other heatmap tracking tools, it does not limit usage to per site, this means one can use the same account on multiple websites. What goes amiss here is that there is no screen-capture recording of the visitors and they do limit the number of active pages. However, Crazy Egg has been utilised by most companies to drive sales. For instance, Softmedia, a world’s leading provider in penny auction software used Crazy Egg heatmaps to identify problem areas on their website. They successfully identified distractions that were preventing visitors from completing  the desired actions. After removing these, conversions increased by 51%, and also improved their user interface.

2. Mouseflow: Mouseflow is another easy to use heatmap tool for WordPress users. Mouseflow offers click, scroll, movement and attention heatmap. It also offers recording of website visitor activity. Sticker Gigant, an emerging social media beauty brand from Germany, approached Mouseflow on relaunch of their website to engage users better and to drive performance. With the help of Mouseflow, Sticker Gigant was able to identify issues in the user interface immediately after relaunching the website. After relaunch, Mouseflow improved the average shopping basket value by 78%, increased orders with iOS devices by 26%, and raised cross-selling with first orders by 18%. These numbers are evidence of how effective heat maps are and these are great tools for tracking website traffic.

Another useful feature offered by Mouseflow is form analytics, which allows one to see why users are abandoning forms. It also tracks funnels, custom funnels can be setup to understand the different sources of traffic and their behaviour. Media companies using Wordpress tend to use their WordPress plugin as it provides support for WordPress multi-sites, which lets one watch the analytics from various domains through a single source; giving insights not only on visitor demographics but also visitor activity.

3. Inspectlet: is a very powerful session recording and heatmap service. It displays how people interact on web-pages employs eye-tracking, shows clicking as well as scrolling on the heatmaps. Their conversion funnel analytics is ideal for those selling products online and their engagement heatmaps are also impressively detailed, tracks all interactions including visitors comments. They also offer conversion funnel analytics with  powerful tagging filtering feature along with form analytics to understand and optimise lead generation. This feature has been helpful for those driving multiple websites in e commerce.

Blue Kangaroo, a social retail website, features trending products and deals from thousands of stores. Prior to Inspectlet, Blue Kangaroo relied solely on analytic charts and graphs to better understand their users. With Inspectlet, Blue Kangaroo could compare how much time their audience was spending on similar products. Taking these inputs into account, Blue Kangaroo improved their algorithm and design, leading to an 84% increase in total clicks.

Heatmap tracking tools give detailed overview of how well users are engaging with the website along with how these are used as tools for tracking website traffic. Heatmaps show both - qualitative and quantitative behavioural metrics.

Media companies are using these heat maps not only to understand the user interface but also using it to get a broader view social media impressions. For, instance-'one million tweet map', is used to see how often people are tweeting around the world and the top trending topics they're tweeting about. Such heat maps provide an idea of when and where specific conversations are/were at their peak. It helps companies to track trending conversations, understand where exactly these conversations are taking place, also use these tools for tracking website traffic as well as track the success of a particular online campaign.

The visual representation makes it easier to analyse the data and gives a direction  to improve search rankings, performance and deliver better user experience.

Discalimer : Image used above is no a real time tracked one, but just for reference.



 

 

Object-Oriented Programming Concepts in PHP - Part 1

PHP is a server-side scripting language, mainly used for web development but also used as a general-purpose programming language. Object-Oriented Programming (PHP OOP),  is a type of programming language principle added to php5, that helps in building complex, reusable web applications.

In this blog, we will be explaining some of the Object-Oriented Programming concepts in PHP with some examples.

The  PHP Object-Oriented Programming concepts are:

 

  • Class 
  • Objects
  • Inheritance
  • Interface
  • Abstraction
  • Magic Methods

Class  & Object:

  • Class is a programmer-defined data type, which includes local methods and local variables.
  • Class is a collection of objects. Object has properties and behaviour.
  • First we have to define a php class, where classname should be same as filename.

Example for simple class:

 

 

Output:

Drupal book

900 Rs/-

In the basics of object-oriented, let see how to define a class and create an object:

Creating Objects in PHP

When class is created, we can create any number of objects in that class. The object is created with the help of the new keyword.

Calling Member Function

When the object is created we can access the variables and method function of the class with the help of operator ‘->, accessing the method is done to get the information of that method. Also, look into how we can access object properties via variables

 

Output for the above code 

Samsung S8

Iphone S7

MI4

90000

65000

15000

Inheritance

When the properties and the methods of the parent class are accessed by the child class, we call the concept has inheritance. The child class can inherit the parent method and give own method implementation, this property is called overridden method. When the same method of the parent class is inherited we call as inherited method. Now let us see types of inheritance supported in Object Oriented Programming and corresponding Php inheritance examples.



 

 

 

 

Types Of Inheritance

  1. Single Level Inheritance
  2. Multilevel Inheritance

Single Level Inheritance:  In Single Level Inheritance the Parent class methods will be extended by the child class. All the methods can be inherited.



Single Level Inheritance

Single Level Inheritance

Example for Single Level Inheritance

 

Output

Hi : Pavan

I am from valuebound

Hi: savan

I am from ABC

MultiLevel Inheritance :  In MultiLevel Inheritance, the parent class method will be inherited by child class and again subclass will inherit the child class method. 

MultiLevelInheritance

 

Output

Class A is 80

Class B is 50 

Class C 20

 

INTERFACES:

  • An interface is a description of the actions that an object can do.
  • Interface is written in the same way as the class the declaration with interface keyword.

Rules of Interfaces:

  • All methods declared in an interface must be public; this is the nature of an interface.
  • All methods in the interface must be implemented within a class; failure to do so will result in a fatal error.
  • The class implementing the interface must use the exact same method signatures as are defined in the interface
  • Interfaces can be extended like classes using the extends operator.

Example for the interface class

Output:

Describing Mango tree

2) Interface can be extended with another interface using extends keyword

 

Output:

division of 10/2 is 5

multiplication of 2*3 is 6

Note on Interfaces:-

  • We cannot create objects to interface, but the class implementing the interface can have objects
  • We cannot define a variable in an interface.
  • If we extend interface all the methods of the interface must be implemented in the child class.

 

Abstract Classes:

  • An abstract class is a class that contains at least one abstract method. The abstract method is function declaration without anybody and it has the only name of the method and its parameters.
  • There can be any number of methods in the class and we have to declare the class as abstract only when there is an abstract method

Example for Abstract class



Output for the above code is:

Maruthi Suzuki

720000

Hyundai

300000

Notes on Abstract classes:

  • Objects cannot be created for the abstract classes.
  • If a class has only one method as an abstract, then that class must be an abstract class.
  • The child class which extends an abstract class must define all the methods of the abstract class.
  • If the abstract method is defined as protected in the parent class, the function implementation must be defined as either protected or public, but not private.
  • The signatures of the methods must match, optional parameters given in the child class will not be accepted and error will be shown.
  • Abstract classes that declare all their methods as abstract are not interfaces with different names. One can implement multiple interfaces, but not extend multiple classes (or abstract classes).

Now Let us see the difference between abstract class and interface.

Abstract class Interface
It can have constants, members, method stubs (methods without a body), methods It can only have constants and methods stubs.

Methods and members can have public or protected  visibility

 

Methods of interface should only be public not any other visibility

The concept of multiple inheritances not supported.

 

An interface can extend or a class can implement multiple other interfaces.

 

Child class must implement all the abstract method of parent class when extend keyword is used.

 

No need of implementing methods from parent interface when interface  is extending another interface

In the end, now we are able to create a class, define objects for the class, and create methods. We also learned about different topics of object-oriented like inheritance, interface, and abstraction. The basic concepts of OOP are explained in this blog. 

Related: Understanding PHPUnit and How to write Unit test cases

 



Revolutionize Your Business: Embrace PHP OOP for Growth

 

How to create custom Form with CRUD (Create, Delete, Update) operations in Drupal 8

Custom form with CRUD Operations is basically building the form with different fields like UID, Name, Mobile Number, Address, Email id etc. The CRUD operations for these fields is Deleting the value of the fields from the database or updating the existing value with new value, and printing the updated value. 

How To Create a Custom form with CRUD Operations?

To create a custom form with CRUD Operations, we need to follow the following folder structure as shown in the image. To perform the same operation of crud in drupal we need to follow the following folder structure.

CRUD Folder Structure



 

The data from the database will be displayed in the form of a table and the table will contain operations as a new column. The role of operations column is to perform edit(update) operation or the delete operation. The edit operation is used to update the present value into new values and delete operations is used to delete the entire row. The following files and procedures help us to create a custom form with CRUD operations. Create the files as shown in the image.

mydata.info.yml:

The .info.yml files is most important part of Drupal Modules. The .info.yml file is a collection of static text file, used to define and configuring a module. First, we have to create info.yml file which contains metadata about the project like the name of the module, description, core, package.

mydata.install:

mydata.install helps to create a table in the database. I have created a table called mydata in the database.hook_schema helps to store the values into the database. In our custom form the crud database will be stored in mydata as the table name. If the value is stored in the database, it helps in performing CRUD operations,like edit or delete. I have stored the fields as name, id, mobile number, email, age gender. Id is autoincrement with the help of serial type.

mydata.routing.yml

mydata.routing.yml helps to transfer the function to the Controller to display of data in table format, to create form and placing that form in blocks. When '/mydata/hello/table' is passed to the url the Controller  DisplayTableController is called and the controller will display the data from database in table format. Similarly when the ‘/mydata/form/mydata’ is passed to the url the form containing credentials like name, id , age etc is shown to the user. The user has to enter the details.



When the path  '/mydata/form/delete/{cid}' is passed to url DeleteForm.php is called. By this file you can delete the fields present in the database row by row.

Controller

In the src/Controller create a file called 

DisplayTableController :

In this file, we will display the output in the table format. We have used the standard way of displaying the values of the row in table format.

The code for displaying the value in table format. The $header_table must be defined, like what are the column values that need to be displayed in the table format.

Form

In the src create a folder called Form, In the form folder, we will create a file which will help to create form fields like Textfield, checkbox, select list, number etc..

MydataForm:

In this file, we will create the form fields for  UID, Name, Mobile Number, Email, age etc. For more info on form API, visit https://www.drupal.org/docs/8/api/form-api/introduction-to-form-api . The complete code for the Mydata form is shown below

In the above file we have performed both Insert and update operations. If the user clicks the edit operations then it will call the update functions or it will be insert operation.We have used three methods to perform the operation

  • Buildform: It is the method which is used to construct the form with different types like text field email, select checkbox etc
  • ValidateForm : In this method we provide validation conditions for the form, that has to be validated before the form values get submitted
  • Submit form : In this method the values will be submitted to the database so, it can be retrieved. 

   2.  DeleteForm.php :

In this file we will perform delete operation. I have followed certain standards to delete operation, we can also user db_delete operation. The complete code for the delete operation is shown below

Note : cid is the current value form the url and cid is stored in this->id(current id).

BLOCK



1 MydataBlock:

This block helps to place the form fields anywhere in the UI. Placing the block can be done by going to admin/Structure/block and placing the block in any of the regions. The code of MydataBlock is shown below

The output of the above module is shown below

CustomForm

The above screenshot displays all the form fields that are to be entered by the user .It is a block that is placed 

CrudOperationPage(output page):  

It display the option for delete or edit

Output of CRUD

 

Reference : https://github.com/pavanBS/drupal-module-crud

 

 

Valuebound's awesome weekend at Drupal Camp Mumbai 2017

We had an awesome weekend at Drupal Camp Mumbai 2017. Met a lot of wonderful people and discussed and planned a host of community activities for the Bangalore Drupal community.


The one above was the first group photo post lunch. The Drupal Camp Mumbai 2017 was held at IIT Bombay, with a footfall of around 500 Drupalers, college students, and experts. Valuebound was one of the Gold sponsors for the event along with Acquia and we are glad to help with T-shirt and ID cards. Who doesn’t like an event Tee!

 

 

We had a tremendous response from the participants of the Drupal Camp. Valuebound had a booth where we saw a lot of participants register for an ongoing hiring process.

 

 

Drupal 8 was the main attraction for the booth since Valuebound only works with Drupal 8. Aaaaand! We are still HIRING. Find out more about opportunities with Valuebound. 

 

 

We had five sessions altogether in the camp, Rakesh James & Manoj Kumar presented sessions on How to start Contributions, PHPUnit for Drupal, Drupal 8 Migration and Creating Drupal 8 Modules using the Drupal Console. It was a jam-packed session (see the tweet below!) but unfortunately, we weren't there to click a pic :(

 

 

We also were a part of the CXO meeting - discussed how to improve the market share of Drupal, increase awareness for Drupal. CSI and Acquia to help promote FOSS and Drupal in colleges.

 

 

Meeting Vijay, the only Indian in the Drupal core maintainers list.

 

 

Awesome code-sprint, lots of participants and a room full of enthusiasm!

 

 

Photo-session after a great workshop with Rakesh and Manoj

 

 

We discussed bringing all Drupal Camps to once place or one umbrella to avoid clashes for the camp dates.

 

 

Meeting Sudheesh Sudhakaran from TCS, we had a long chat and discussed Drupal Camp Bangalore. Yes, it might be happening sooner than you think!

 

 

It was a great experience for us all and we look forward to being great hosts once again like the 2015 Bangalore Drupal Camp. We took with us a lot of inspirations, good works, great memories, a lot of pals, and ideas for more community contributions and Collaborations.

 

How to Sync Blocks Between different environments in a Drupal 8 website

A custom block is made of two entities, one for the placement and one for the actual content. Only the actual placement can be exported with cim. The content can not. Therefore this will result in "Block description Broken/Missing" error on site where the config is imported. And since there is no option to disable custom blocks from being exported through Configuration management, this will break the functionality.

Steps to reproduce

On Site A:

Create custom block

Assign this custom block to any region

Export configuration of the site

On Site B:

Import configuration from site A

Go to Block layout and you will see custom block in correctly assigned region, however block won't work or actually show anything.

Edit that block, you will see this messages:

Block description Broken/Missing

   This block is broken or missing. You may be missing content or you might need to enable the original module.

Go under Custom block library and you won't see custom block.

Block layout got exported but block content didn't resulting in broken relationship.

Block In Local Instance

In the above image a drupal block named “Block Content test” is added in content region in a local instance.

Block In Dev Instance

The above image shows that the block is missing after importing configuration using Drush command “drush cim”.

Way 1: Using Database Sync

  1. Create Custom Block in Site B.

  2. Replace db of Site A with Site B using drush sql-sync

  3. Now the block is available in Site A. So will place it in a region.

  4. Use drush cex to export config and commit to Site B.

  5. Use drush cim in Site B and the block will be placed in the region.

Way 2: Use Drupal drush functions to export config and hook_update_n & block uuid to update content.

  1. Create block B4 Test in Site A.

  2. Place the block in some region.

  3. Export using drush cex.

  4. Commit and run drush cim in site B

  5. Block error will be shown in Site B

  6. Write hook_update_n and  commit. Take Update in Site B and run update.php in Site B to add the block.

  7. Check Site B if the block is placed or not.

We have used Drush Commands “drush cex” to export block configurations and “drush cim” to import the configurations.

So Once drush cim is done in site B write a hook_update_N in your custom module's .install file use the block uuid to update the database of Site B.

After running update.php the block will be placed in the region

The first method can be used where the database size is less as it will take less time to sync the database. The 2nd method can be used where the database size is huge.

Reference: https://www.drupal.org/node/2756331


Depending on the scenario we can use any one of the methods. In this blog I have explained the two methods which we can use for updating blocks from one environment to another.

How to build a simple form using AJAX in Drupal 8

Ajax is a script on the client side communicating asynchronously with the server without a complete page refresh.The best description I came across about Ajax as “the method of exchanging data with a server, and updating parts of a web page – without reloading the entire page.”

In our project, while creating a new account if we give the existing username, on submitting the page it will throw an error. But, instead of reloading the page, we can just update certain parts of DOM. This can be achieved using AJAX. So, here is the example how to implement this ajax in drupal 8 forms.

In order to build a simple form using AJAX in Drupal 8 , we created a form with Username field. Using ajax we are going to validate that field. To achieve this, create a custom module ajax_example it requires 3 files which are ajax_example.info.yml, ajax_example.routing.yml, src\Form\AjaxExampleForm.php. The steps were listed below, how to validate the text field using AJAX.

Step 1: Create .info.yml

Let's create a yml file. A yml file is a file that specifies the configuration for a file i.e., to store metadata information about the project

Step 2: Creating .routing.yml Let’s create a .routing.yml called ajax_example.routing.yml. Each route is defined as a machine name in the form of module_name.route_name

Step 3: Create AjaxExampleForm.php

Create a new file called AjaxExampleForm.php inside of src/Form/{AjaxExampleForm.php}.

getFormId() function is used to create a unique id to the form.

buildForm() function is used to create the form and it has a textfield to validate the username using #ajax. Drupal provides the property ‘#ajax’ to a form element in your form array, to trigger an Ajax response.

checkUserEmailValidation() is the callback function to handle the server side of the ajax event i.e., to check the user or email is already exists in the database or not.

Drupal provides user_load_by_name() function for getting the username and user_load_by_mail() function for getting the Email. To return commands, you need to set up an object of class Drupal\Core\Ajax\AjaxResponse and the addCommand method is used to add the individual command to it.

Step 4: Here is our Ajax output in drupal 8 Form. The main objective of this blog is to validate the existing username or email without reloading the page.

Ajax output in drupal 8 Form

In drupal 8, we can achieve this by using ‘#ajax’ attribute and return the ajax response using the object of the class Drupal\Core\Ajax\AjaxResponse and added the individual command using addCommand method with the object of the class Drupal\Core\Ajax\HtmlCommand to show the message.

So, in this article, we have see an example regarding AJAX, to just update certain part of DOM, instead of reloading the whole page.

How to use Configuration Split Module to Split Configurations in Drupal 8

The configuration Split module allows users to define sets of configuration that will get exported to separate directories when exporting and get merged together when importing.

  • Drupal split module depends on Config Filter for the integration with the import/export pipeline of the Drupal UI and drush.

  • It is possible to define in settings.php which of these sets should be active and considered for the export and import

                                Here are a few things that are considered configuration:

Configuration split exposes a configuration entity which controls what you want to split off. Currently, you can

 

  • Blacklist modules: Any configuration that this drupal split module owns will automatically be blacklisted too.
  • Blacklist configuration: settings or configuration entities. These will be removed from the activesync directory.
  1.  Download and Enable Drupal configuration split module :- drush en config_split -y
  2.  Go to configuration  -> Configuration Split settings

Configuration Split Setting

  • Click on 'Add configuration split'. Naming is important, so we'll enter 'Dev split' as the name for this configuration. We'll also create a directory called 'sync-dev-split'. (where the config file will go from activesync directory)
  • Select Module’s from which configuration file (yml files ) will get split into another folder in root directory of your module .

Configuration Split Setting

  • There is an status Option which should be active (Checked)
  • Save

3. Doing exports and imports on dev or live .

From now on, if you want to import new settings whether it's on your dev or live environment, you can not use the drush core commands anymore. Use following commands: Go to Terminal 

A) Export your configuration in other folder

  • drush csex dev_split
  • sync-dev-split
  • Y/N option will be there =>Y
  • List of yml files => ls sync-dev-split
  • # to export on your dev environment ->    @dev:/home/drupal/drupal-core$ drush csex dev_split
  • # to export on your live environment ->     @live:/home/drupal/drupal-core$ drush csex live_split

B) Import Your configuration

  • In local -> drush csim dev_split
  • In dev site - drush @pantheon.config-split.dev csim dev_split
  • # to import on your dev environment ->    @dev:/home/drupal/drupal-core$ drush csim dev_split
  • # to import on your live environment ->    @live:/home/drupal/drupal-core$ drush csim live_split

                                                                                    OR

C) You can directly Import your Configuration

Go to Configuration-> Configuration Synchronization - If you have added multiple split config settings, then it will be shown like this in Configuration Synchronization

Synchronize Configuration Setting

There you can see Multiple Split configuration option like dev split & live Split

If you want to use “Dev split” go to your settings.php file

  • $config['config_split.config_split.dev_split']['status']= TRUE;
  • $config['config_split.config_split.live_split']['status']= False;
  • $config['config_split.config_split.test_split']['status']= False;

Result :

Synchronize Configuration Setting

References :

How to Create Configurable Block programmatically In Drupal 8

Blocks are the boxes of content that can be displayed in regions like sidebar first, sidebar second, content. This functionality is provided by the Block module in drupal 8. Here describing to creating Configurable Block programmatically in drupal 8 by using the drupal console.

Configurable Block module & skeleton files created by following drupal console commands:

$drupal generate: module

Generate_Module

By using drupal console to generate configurable block module it create configure_block.info.yml file like,

structure_info_file

Configure_block.info.yml file contain the following information:

info.yml_file
The .info.yml file contains metadata about the project like the name of the project (configure_block), type (module), description (This is an example of configurable block programmatically in drupal 8), core (8.x), packages (Custom) and dependencies etc.

 

Next, we need to create a plugin for Block Module. Create folder Plugin under src, create Block folder under Plugin then create DefaultBlock.php file under Block folder.

  • The path should be /src/Plugin/Block/DefaultBlock.php

(or)

Next, we need to generate Block module using following drupal console command,

 

$drupal generate:plugin:block

generate_plugin_block

After generated configurable block module by using drupal console, it should be like,

 

structure_plugin_block

 

The Configurable block module Skeleton in drupal 8 is like this:

  • module/custom/configure_block/src/Plugin/Block/DefaultBlock.php
  • module/custom/configure_block/configure_block.info.yml

where configure_block is a module name for our custom configurable block. The plugin of configurable block module file will have following code where we are defining our configurable fields in drupal 8.

 

DefaultBlock.php:

 

Here we take three fields of the configurable block which are hello_block_name, mobile_number and address. The message is to be displayed, based on what you enter in those fields of block module in drupal 8.

 

Next, install your configurable block module in drupal 8.

 

Goto

Extend >select install module>select your module name>click install.

install_block

 

Next place the configurable Block module in any regions are presented in drupal 8.

 

Goto

      Structure>Block Layout>click place block icon>select your block name>select region>save block.

Goto

    Configuration block>enter in the following field what you need to display output.

 

Configure_Block

Then go to the main page,

 

Configurable block Module displayed in some region (selected region example: sidebar second). It shows following output.

 

final_output

 

I hope this was helpful in getting you started with Custom configurable block in Drupal 8.


Reference: https://github.com/munavlakshmi/create-configure-block-in-drupal-8

Why Profiling is necessary for Performance Benchmarking?

40% of users abandon a website that takes more than 3 seconds to load.

Websites are typically viewed on a large variety of devices with various systems, it may be handheld device or desktops, might run a Mac OS or have Windows but the bottom line is when a visitor is on the homepage of your website or loading items on the e commerce portal or using some other functionality on the website they expect it to be fast and move with the speed of their finger swaps.

What affects Website Performance?

Performance of a website depends on a lot of factors, the performance of the code, factors that have been kept in mind while making that code, number of visitors currently viewing the website, connections to database and so on. To ensure smooth functioning of a website according to expectations it is necessary that it goes through performance testing.

Performance Testing gives the power to analyze your code and find bottlenecks and determine which parts of your code needs a tweak to boost the speed. It helps to determine the points of breakage of the technology stack used in the development of the application. It also helps to find the limit to the number of users the website can handle in case of a spike, like media and publishing websites when Presidential Elections were running.

How does performance boosting help?

  1. Wal-Mart trailed its competitors online until they made improvements. For every 1 second of improvement to load time, the site experienced up to a 2% improvement in conversion rate.

  2. Intuit cut load time in half and saw an increase of 14% in conversions.

  3. GQ decreased its average load time from 7 to 2 seconds and saw an 83% increase in traffic.

Source

You might have added some new functionalities to your website and now the server load has increased and also the memory usage and also the page is slow to load. But does that mean you change the hardware? Even if that is an option it is not a viable solution and this is exactly where performance profiling comes into the picture, to analyse and understand what makes the system slower and fix them.

Performance profiling is to investigate and analyse a code’s runtime behavior to understand the areas that need improvement and how to optimize a program’s performance. The data collected during the execution of a program helps developers to analyze the code.

It helps apps run faster, at different stages of deployment, Performance Testing helps to determine which particular feature addition to your web application has made it slower or analyse the behavior of apps.

How do Profilers work?

Developers say that different profilers work in different ways, however in general profilers examine programs during the runtime to find which assembly instruction is currently being executed (the program counter) and which routines called the current function (the call stack). This kind of sampling profiler can work with standard binaries, but are more useful if you have debugging symbols to work out lines of code given addresses in the program.

As well as sampling regularly, you can also use processor performance counters to sample after a certain number of events such as cache misses, which will help you see which parts of your program are slowing down due to memory accesses.

Other profilers involve recompiling the program to insert instructions (known as instrumentation) to count how often each continuous set of instructions (basic blocks) are executed, or maybe even record the sequence in which basic blocks are executed, or record the content of variables at certain places.

The instrumentation approach can give you all the precision and data you might want, but will slow down the program and that will change its performance characteristics. By contrast, with sampling based approaches you can tune the performance impact against the length of time you need to run the program against the accuracy of the profile data you obtain.

Why Profiling for Performance Benchmarking is necessary ?

Performance profiling is pivotal to the performance of the website it helps to understand the client-server response time. Performance issues during a spike or in peak times. It helps to understand if any database connections or the technology is a holdup in your web application and help change any components causing so. It also determines behavioral changes in applications caused with a new release.

Performance profiling works as a benchmark against coding changes and efficiency  of the website.

How to Migrate a Website to Drupal 8

We all know that now is the time to move into Drupal 8 from the other Drupal versions.  And it is very important for a Drupal developer to know about Migrating into Drupal 8 and Website Migration in general. This was a session presented at the DrupalCamp Mumbai 2017, I spoke about the experience of migrating a Legacy System which built on Adobe ColdFusion.

Website migrations occur now and then for numerous reasons and now that we are working on Drupal 8, it is absolutely necessary to migrate from Drupal 6 or 7 to Drupal 8 to fully utilize the power of Drupal.

The session focuses on:

  • Case Study of  Migrating a Legacy System into Drupal8.

  • Migration in Drupal 8 Core.

  • D6 to D8 migration.

  • D7 to D8 migration.

  • Migrating from JSON and CSV data.

  • Migrate Source Plugin

    • Why or When we need to write Migrate Source plugin?

    • How to Write Migrate source plugin?

  • Migrate Process Plugin

    • Why or When we need to write Migrate Process plugin?

    • How to Write Migrate Process plugin?

  • Migration using Drush.

 

Related:

Why & How to Migrate Drupal 8

Porting drupal 7 module to drupal 8 using Drupal Module Upgrader

How to migrate Users from a CSV file in Drupal 8?

 

Download the Drupal Guide
Enter your email address to receive the guide.
get in touch