Creating an Effective Content Personalization

Personalization isn’t a new concept. The creator and project lead of Drupal, Dries himself believes that “personalization and contextualization are becoming critical building blocks in the future of the web.’’ Let’s elaborate the concept of personalization first. 

Personalization is the tailoring of web content to match the user priorities. This concept revolves around finding a suitable method to enable the content delivery to users based on their preference as well as past behavior. So what steps we can follow to achieve an effective content personalization? Let’s dive in.

Understand the Queries:

Firstly, it’s important to know - what your customers are expecting from you. This may involve primary as well as secondary research, followed by an in-depth analysis, to understand the queries. This will help in persuading the users that the content you’ve provided is relevant and has utmost importance. Undoubtedly, knowing these queries can play a significant role in shaping the content structure you plan for enhancing customer engagement on your website. 

Know your Target Audience: 

This is yet another step that helps you to offer personalized content that best matches to your customers demand. A website can have thousands of anonymous visitors with their different usage pattern depending on their behavior, context, history and, filtration. Therefore, identifying your target audience should be one of the fundamental steps you must follow to achieve better content personalization goal.

Sort out your content types:

The next step is to sort out the content types according to the needs of the users individually. Let’s take an example. 

Let’s assume, we have three users, say - A, B and, C. All these users have their own individual priorities and histories. Some amongst them may be accessing the content on a mobile while others on the web. And perhaps one may be interested in online shopping, others may like daily updates over your site and so on.

Sorting out content types according to preference, behavior and geolocation.

 

So, what do we do? All we need here is to classify the content according to consumer needs with the right personalization tools and align it to the portal accordingly.

Develop a Content Strategy:

Now, that you have a fair idea about your target audience and their personas, devise a strategy to map the contents of your portal. This must be based on the defined customer persona, content categorization and the user experience on your website. The content should be engaging to hook customers. Otherwise, an irrelevant or boring content can stifle their interest resulting in higher bounce rate. 

Analyze the Market and Competition:

In the growing competition, it’s important to closely watch your competitors and monitor their activities regularly. Conducting a regular analysis helps you to find out what your competitors are doing to enhance brand awareness and generate new leads. Further, this activity should reflect on your strategy too.  Here, a detailed market research can be used to develop and adopt more powerful optimization tools. Eventually, adopting these robust tools will help you in enhancing customer engagement and staying ahead.

Optimizing User Experience with Content Personalization 

As discussed, there are various steps to be followed for an effective content personalization. Also, the scope of this has become wider with a host of options available in the market today based on various recommendations. Let’s have a look.

Web Analytics Integrated Personalization:

  • Adobe Target: Adobe Target enables you to deliver a personalized content based on real-time data.  It automates the targeting process in order to reduce workload while enhancing conversions.
  • Google Optimize: Google optimize allows multivariate testing of your website to deliver a personalized experience to all customers and businesses. It can seamlessly integrate with Google Analytics and Bigquery, visual editing, experiment management, etc.

SaaS Tools for E-Commerce Personalization:

  • Bunting Personalization: Bunting helps in setting up personalized content that targets right visitors at the right time in their journey across channels and various touchpoints.
  • Apptus: Apptus combines big data and machine learning to constantly enable your e-commerce site’s exposure strategies, sales performance while minimizing the costs to drive organizational efficiency.

Personalization as a part of Web Development Platforms:

  • Magento: It is an open source e-commerce platform comes with various extensions for personalization such as UNBXD and Commerce Stack.
  • Episerver: Episerver’s intelligent personalization feature adapts to change visitor patterns and campaigns to allow automatic recommendations.
  • Acquia Lift: Lift merges anonymous and known visitor profiles by adaptively segmenting your content in real-time. It can be implemented using Drupal’s Acquia Lift Connector module.

Tools for Marketing Automation and Personalization:

  • Evergage: Evergage tracks all real-time interactions with your webpage to deliver a maximally relevant individualized experience. It comes with features such as A/B testing, cloud-based optimization, etc.
  • Sitespect Personalization: Sitespect helps companies deliver enhanced, personalized and engaging experience to site visitors. 
  • Lytics Personalization: Using its unified customer profiles, Lytics helps you to personalize all your data. It targets visitors and combines intent data and your site’s behavioral and demographic data for a better experience.
  • Blueconic: Blueconic is a Customer Data Platform (CDP) that helps to translate customer insights into a personalized communication method by creating a dynamic profile of each customer. It quickly enhances all customer profiles and helps easy delivery of cross-channel personalization to drive perfect customer interaction.

Enterprise level Business Personalization tools:

  • Oracle Eloqua Personalization: Oracle Eloqua equips marketers with lead campaign management tools that help marketers engage the right audience at the right time in the buyer's journey while providing real-time insights.
  • Monetate: Monetate includes various options for personalization such as A/B testing, multivariate testing, targeting and segmentation, individualized real-time personalization, etc.

To sum up, digital innovation is taking power in this rapidly progressing market which makes it obligatory for firms to strategize their game plan accordingly. Using right tools and steps to personalize your content helps to enhance the user experience globally. It is also playing a vital role for businesses in expanding their B2B relations and even invoking user trust.

Working on a new project? Get in touch with our Drupal experts today for a hassle-free web development.

Image Credits: 
https://www.freepik.com/ 
https://pixabay.com/ 

AngularJS Series: Everything about Custom Directives

So far we have gone through different components of AngularJS, such as Data Binding, Modules and Controllers, Scope, Custom Services, and Filters. In this blog, we will discuss custom Directives, followed up by Dependency Injection, Functions and Routing.

Before we proceed to Custom directives, please go through the previous blogs (mentioned above) to have a better understanding of Angular and its components. Not to mention this part of the series requires advanced-level knowledge of AngularJS. 

In AngularJS, Directives allow you to extend HTML. The directive allows you to create custom tags in AngularJS. By adding existing or custom Angular Directives, one can get the functionality work in the application. Technically AngularJS tells the browser while compiling, to attach behavior to the element or transform the DOM element. We can also manipulate DOM using jQuery, however, creating custom directives let you reuse the element across the AngularJS application as per your requirement.

Note that AngularJS allows you to Create Controller & Services for an application. Similarly, we can also create Directives in AngularJS.

Most of you have seen the basic directives that we use in everyday application development. They are ng-app, ng-init, ng-model, ng-repeat. 

Ng-model binds the value of HTML with angular. 
Ng-repeat repeats HTML element.
Ng-init initializes data for the app. 
Ng-class dynamically binds CSS classes to HTML & these directives could be a string, object or an array.
Ng-app is used to the bootstrap application. 

Relevant: Everything about Filters in AngularJS

In AngularJS, Directives starts with ng- or data-ng-. And there are various ways we can create directives in AngularJS:

One of the basic way is:

Another way is:

It’s quite similar to HTML where we store custom data that will be stored in a page or an application. You can also validate the same through HTML editor.



Custom Directives:  

We can declare custom Directives only after declaring the same as mentioned below:

 /

AngularJS provides the naming convention for custom directives so that the name of an attribute will match to custom Directives. There are few guidelines & suggestions from AngularJS while declaring and calling the same in your application.
    

  • Try to write Directives name in the lower case.
  • Suppose your new Directive is ‘MyNewDirective’. To call directives in the View, write my-new-directive, my_new_directive, my:new:directive, you can use (,) comma colon(:) underscore(_) hyphen(-).
  • Template property for Directives allows you to add the HTML content to the HTML. 


Sample code:

  • In case you want to make HTML content more dynamic based on some business logic then use link keyword to achieve the same. Also known for DOM manipulation, Link function accepts three parameters: Scope, Element, and Attribute.
  • Also, we have scope property under AngularJS custom Directives. This is all about boundaries/limitations of a directive to use controller object. It provides an ability to isolate parent controller scope property and different ways to use under your custom Directives. Will take it up here using some of the examples.
  • We can also define Angular Controller inside the Directives and manipulate the scope inside controller function itself. 
  • Custom Directives uses a property called replace that tells, which Directive element needs to be applied. By default, it remains in a disable mode and applied directly to the child element. To enable, we need to add replace: true as one of the directive parameter.

with replace: true


Output:

with replace: false(default)


Output:

  • Custom Directives uses a keyword ‘restrict’ that allows you to define the variety of HTML element.

E: Application look for matching HTML element and enable HTML tag.
Syntax:             
sample:          

A: Application look for matching HTML attribute and enable Directive HTML attribute.
Syntax:          


Sample:          
 

C: Application look for enabling CSS, when app finds matching CSS class then Directive get replaced.
Syntax:          


Sample:         
 

M: Directive is used very rarely, when we require to pass markup validations. And activated once AngularJS finds match HTML comment.
Syntax:           
Sample:         

We can also include these directive Restrict option under single restrict.
Sample:             restrict ‘AEC’    or  restrict ‘ACE’  or restrict ‘CEA’

All have to reflect the same o/p irrespective of order. By default, restrict takes ‘AE’ as parameter option.

Sample code: 

 

Directive output

 

  • Under Custom Directives declaration, we have one more keyword - ‘template’ - that is used to specify the HTML content to be added in the View.

sample:   

    return {
          restrict: ‘E’,
          template: '

{{result}}

' };

So far we have seen definition, using guideline. Let’s see how to create a custom Directive. Remember that  creating a custom Directive is quite similar to factory service creation and it returns HTML.

App.directives(‘newCustomDirectives’, function() {
    return {
    template: “

Custom Directives with custom template.

” }; });

And same could be rendered in view as shown below:
So any directive name written in the uppercase could be pulled to the view by eliminating uppercase with hyphen and lowercase.

Eg.: ‘newCustomerRequest’ should be ‘new-customer-request’
       ‘newCustomerRequest’ should be ‘new:customer:request’

The above source code will create custom Directive and inject HTML directly in the View.
 

Source code: 

Directive.html


Directive.js

The above source code is used to render data from custom Directives. Some of the Directives like ng-app, ng-controller are also available for app bootstrapping and compile your code functionality based on your app controller in browser. When ng-directives found in your HTML code.            

 

 

Welcome Directive output

 

Just to make sure, how data is getting displayed I have used Firebug to show detailed HTML structure to you. By using Firebug, you can find that your data is being printed inside your custom Directive. 

 

Welcome to Custom AngularJS Directives


Directive.js

By now you must have a pretty good idea about creating an Angular module for your application. You also have enough knowledge on Angular controller, how to create them and use across the application.

Creating a custom directive uses similar fashion like factory service creation. In case of factory service, we use the similar structure as above & service returns an object. Similarly, in custom Directive creation, we use the same formula.

The above code should return template having

{{result}}

. Here the result (above source code) is controller object. And having a static value "Welcome to Custom AngularJS Directives". 

 

It’s okay to write small HTML tags inside an AngularJS application for custom Directive templates. However, we shouldn’t follow the same if we have large HTML codebase to be pushed to the Directives. Here we need to differentiate between HTML and JS in an Angular application. Note that it’s not a recommended guideline. How can we achieve the same, I will guide you in next example. 

To achieve the above scenario and avoid writing nasty and huge HTML tags inside custom template under Directives, we can use ng-template. This built-in core directive is used to load the content of script into $templateCache


Follow the below guide to make AngularJS work:

1.    In ng-template,

Custom Directive uses template URL instead of template to fetch the data.
Here "my-custom-dir.htm" is the specific ID name. The same name has been taken in directives.html.

return {
      templateUrl: "my-custom-dir.htm"
    } 

Output:
 

Directives with templateurl output

 

Still not sure how to make these template more modular and increase the usability for other AngularJS application. 

Check out how to do that.

1. Create separate file. 
2. Move your HTML code to the new file and save that file with the name "my-custom-dir.htm" as we did earlier.

My-custom-dir.htm


   

{{result}}

Directive.js


Directives.html

In the above source code, we have removed

GraphQL: A Beginners Guide

GraphQL is the new frontier in Application Programming Interfaces (APIs) - a query language for your API and a set of server-side runtimes (implemented in various backend languages) for executing queries. Further, it isn't tied to any specific database or storage engine; instead backed by your existing code and data.

If you are a Javascript developer then there are better chances that you have heard of it. But you are not sure about it. To help you out, I have written this blog post so that you can easily figure out what exactly is GraphQL and how to make most of it. When you will complete this GraphQL blog cum tutorial, you will be able to answer:

  • What is GraphQL
  • Core ideas of GraphQL & limitations of RESTful APIs
  • How GraphQL resolves the limitations of RESTful APIs
  • How GraphQL can be used in Drupal

Let’s get started.

So what is GraphQL?

As I mentioned earlier, GraphQL is a query language for fetching application data in a uniform way. Developed by Facebook in 2012, GraphQL was rolled out in 2015. And for few years, the social media giant used it for internal purpose.

Cutting straight to the chase. GraphQL is a methodology that directly competes with REST (Representational state transfer) APIs, much like REST competed with SOAP at first.

Core Ideas of GraphQL

  1. Client Requests and Server payloads have the same structure.
  2. The server contains the schema.
  3. The client dictates what it wants from the server to provide.

Limitation of RESTful API’s

  1. Multiple Endpoints -- Endpoints are specific to individual views. With a REST approach, you can create multiple endpoints and use HTTP verbs to distinguish read actions (GET) and write actions (POST, PUT, DELETE).
  2. Overfetching -- Response contains more data, mostly unused. For instance, if you hit this URL https://swapi.co/api/people/1/ the response consists of large amount of data like eye-color, gender, links to films. etc.
API response

   

 3. Many Round Trips  -- In the previous URL response, you can see films contain a list of URLs. So in order to get the detail of films you need to hit these URLs resulting in multiple round trips to the server.

How GraphQL Resolves The Limitations of RESTful APIs

  1. Single Endpoint -- Single Endpoint can resolve GraphQL queries and send a single, unified response. GraphQL does not use HTTP verbs to determine the request type.
  2. Tailored Response -- Response is catered to the client demand. With GraphQL you explicitly request just the information you need, you don’t “opt out” from the full response default, but it’s mandatory to pick the fields you want. This helps by saving resources on the server since the payload to transfer is smaller.
  3. Fewer Round Trips -- Returns a single response flexible to accommodate many relationships.

GraphQL in Drupal:

Drupal provides a module named graphql that lets you craft and expose a GraphQL schema for Drupal 8. It is built around a PHP port of GraphQL to support the full official GraphQL specification with all its features.

You can use this module as a foundation for building your own schema through custom code or you can use and extend the generated schema using the plugin architecture. Here the provided plugin implementations will form the sub-module.

There are some other modules based on it like:

  1. GraphQL Mutation: - Core module with common fields and types for enabling mutations. 
  2. GraphQL JSON: - Extract data from various JSON sources.
  3. GraphQL Views: - It provides support for views

The above mutation & JSON modules are in dev version and the views have an alpha release. You can try out these to know more.

Drupal provides an in-browser IDE interface to execute GraphQL queries. You can find that in “graphql/explorer”.

GraphQL

Let’s try our hands on some of the GraphQl Queries & Mutations.

  1. Fields: Write a simple nodeQuery which will return entitylabel & entityid.

    The response of the above query will be similar to this.

    As you can see the response is similar to the actual query. This is essential to GraphQL because you always get back what you expect, and the server knows exactly what fields the client is asking for.
     
  2. Query with arguments

    In the above query, we are getting the title of a node by passing an argument which is the node id. Response from above query will be
     
  3. Query with Filters

    The above query filters nodes by publish status resulting in the below response.
     
  4. Aliases:

    Aliases let you rename the result of a field to anything you want. You can't directly query for the same field with different arguments. If you do a query like this you will get an error:

    The error will be like this: "Fields \"nodeById\" conflict because they have differing arguments." This is where aliases come to rescue. Using it we can give an alias to the two queries as shown below.
     
  5. Fragments: GraphQL includes reusable units called fragments. Fragments let you construct sets of fields, and then include them in queries where you need to. In the below example, you can see I have created a fragment nodeFields.

    The above query will generate a response like this
     
  6. Variables:

    Sometimes we need to pass dynamic values to query. We can pass dynamic values using variables in GraphQL.

    When you start working with variables, we need to do three things:

    > Replace the static value in the query with $variableName
    > Declare $variableName as one of the variables accepted by the query
    > Pass variableName: value in the separate, transport-specific (usually JSON) variables dictionary
     
  7. Mutation

    Most discussions of GraphQL focus on data fetching, but any complete data platform needs a way to modify server-side data as well. The module GraphQL Mutation is needed to perform POST operations. https://www.drupal.org/project/graphql_mutation. It adds GraphQL mutations for all content entities.

So now you are familiar with some of the above-mentioned operations in GraphQL. You can learn more about these in http://graphql.org/learn/. GraphQL can be used to build decoupled Drupal. Here in Github, you can see an example. https://github.com/fubhy/drupal-decoupled-app.

Please comment below if you have any questions or feedback.

Below given is a short presenation on GraphQL.

Drupal 8 - Extending module using Plugin Manager

Often we write and contribute module, but have you ever thought or considered how the module features can be extended? In Drupal 8, we can do so by using Plugin Manager that make our modules extendable. For this, first, you need to know what is Plugin, Plugin Type and how it works. Have a look.

So what is Plugin?

In short, Plugin is small pieces of swappable functionality.

What is Plugin Type?

Plugin type is categorization or grouping of Plugins, which perform similar functionality. Drupal 8 Plugin system has three base elements:

  1. Plugin Types

    The central controlling class that defines the ways plugins of this type will be discovered, instantiated and purpose of all the plugins of that type. For example blocks, field formatter, field widget, etc.

  2. Plugin Discovery

    It is a process of finding plugins which are of particular plugin types. There are four different core discovery types:

    • StaticDiscovery

      It allows for static registration of plugins within the discovery class. A protected variable ($definitions) in the discovery class holds all plugin definitions that are registered with it through the public method setDefinition().

    • HookDiscovery

      Drupal's hook_component_info() or hook_component_info_alter() can be used for plugin discovery. With this discovery, the plugin manager will invoke info hooks to retrieve a list of available plugins.

    • AnnotatedClassDiscovery

      Uses name of the annotations that contain the plugin definition such as @Plugin, @EntityType, in plugin docblocks to discover plugins.

    • YamlDiscovery

      YamlDiscovery allows plugins to be defined in yaml files. For example action.links.menu.yml & action.links.task.yml

  3. Plugin Factory

    The Factory is responsible for instantiating the specific plugin(s) chosen for a given use case.

When to use Plugin or Service?

Plugin

We need Plugins to implement different behaviors via a common interface that means plugins will act in the same way on the same data but output varies. Use the plugin system if you need to expose a UI through which people can configure or select the implementation they want.

Service

Services provide the same functionality and are replaceable but internal implementation will differ.

Plugins vs. Hooks

Plugins are just object-oriented replacement for hooks. Plugins made possible to swap core or contrib module code or plugin.

Creating your own Plugin Manager

For better understanding, I will explain this section based on one of my contributed module dynamictagclouds.

Dynamictagclouds module basically provides tag cloud block, which displays all taxonomy vocabulary tags configured in block configuration. This modules goal is to provide end users an option to select what kind or style of tag cloud they need. Also, this style should be extendable that means other modules should be able to provide their own style for the tag cloud if needed.

Using following Drupal console commands, we can create scaffolding code for Plugin Manager.

  • generate:plugin:type:annotation (gpta)
  • generate:plugin:type:yaml (gpty)

Here I will walk you through generate:plugin:type:annotation. Leaving the other one for you. Executing the above Drupal console command by giving Plugin type class name as TagCloud, the following files will be created:

  1. dynamictagclouds/src/Annotation/TagCloud.php:

    Defines Example item annotation object. Whenever Plugin of this type is been initiated this annotation object will be the plugin definition.

  2. dynamictagclouds/src/Plugin/TagCloudBase.php:

    Base class for Example plugins. All plugins of this type should extend this base class. Add common methods and abstract methods for this plugin type here.

  3. dynamictagclouds/src/Plugin/TagCloudInterface.php:

    Defines an interface for Example plugins. Add get/set methods for your plugin type here.

  4. dynamictagclouds/src/Plugin/TagCloudManager.php:

    Provides the Example plugin manager. It's recommended to extend DefaultPluginManager, which defines annotation plugin discovery and defines plugin factory for instantiation.

  5. dynamictagclouds/dynamictagclouds.services.yml:

    Plugin managers should be defined as services. It is considered best practice to prefix the service name with `plugin.manager`.

Using Plugin and Plugin type to extend module

  1. Create default tag cloud style as a plugin by executing the Drupal console command generate:plugin:skeleton (gps) provide Plugin Id as tag_cloud, which will create a Plugin class file for the specified plugin type. The plugin class will be something like below:
  2. Change the following things:
    1. Extend the DefaultTagCloud class from TagCloudBase instead of implementing TagCloudInterface. Where we can define common methods and properties for the TagCloud plugins.
    2. Implement your plugin logic in TagCloudBase build() method and call parent::build() in DefaultTagCloud.
    3. Optional, if needed define additional annotation parameters. For TagCloud, had defined annotation parameters libraries and template.

    After all the above changes, TagCloudBase.php and DefaultTagCloud.php will be like:

  3. Expose or provide this default tag cloud style plugin in block configuration form. Below is the code to get all the available plugins of specific plugin type
  4. After this any module can create their own tag cloud style plugin and this will be available in block configuration form.
  5. Below code will render the user configured style of tag cloud in the block.

Create tag cloud style plugin in a custom module

  1. In your custom module, create a new plugin for TagCloud which inherits TagCloudBase class. Or copy paste DefaultTagCloud.php to your custom module and rename filename, namespace, and class.
  2. Change the following in plugin annotation:
    1. id - Plugin Id, this should be unique.
    2. label - Plugin style label.
    3. libraries - List of libraries name defined in your module libraries.yml file for your custom tag cloud style.
    4. template - Tag cloud twig template details:
      1. type - template provider module/theme. In your case, it would be 'module'.
      2. name - Module/Theme which defines the template. In your case, it would be your module name.
      3. directory - Directory path where twig template resides.
      4. file - Twig template name excluding '.html.twig'.
  3. Implement your logic in build() method.

Set newly created tag cloud style in tag cloud block configuration and you are done !!!

If you want to check the full working of this code, you can download dynamictagclouds module version >= 8.x-2.0. Hope this blog will be help you in extending module using Plugin Manager. Please comment below and let us know your thoughts on the same.

Reference

https://www.drupal.org/docs/8/api/plugin-api

E-Commerce Solutions and Third-Party Integration Options within Drupal Ecosystem

Drupal has several options and solutions to develop different types of websites including e-commerce portals. Drupalers have redefined the way e-commerce sites used to operate by developing a range of plugins and modules for high-end security, tailored web content, third-party integration, and other utilities. These modules primarily aim at enhancing end users experience, providing a user-friendly interface, flexibility, and reliability.

There are several e-commerce options within Drupal along with options to integrate third-party APIs, which I’ll discuss in a later section. Let’s first discuss the options available within Drupal - Ubercart,  Drupal Commerce, and Magento-Integrated Drupal.

Ubercart

Ubercart is an open source e-commerce solution that comes with a set of modules, designed for running multiple stores on your Drupal site in multiple countries. Driven by two major emphases of flexibility and usability, it has various options like product catalog, shopping cart, and checkout, order, shipping, etc. that can be extended to meet all store requirements.

Drupal Commerce

Drupal Commerce empowers online stores of different sizes with easy configuration and better management, allowing retailers to enhance their customer interaction. The latest version - Drupal Commerce 2.X - comes with a range of new features and contributed modules. It is well suited for online stores targeting niche market where product attributes need tailored content to bolster their business.

Magento Integrated with Drupal

The integration of Magento with Drupal and Acquia’s Acquia Commerce Manager can be used to create a full user commerce experience for your customers. This will not only deliver highly personalized, content-rich experiences across every touchpoint but will allow marketers to collaborate with merchandisers.

Third-Party API Integration at each stage using Drupal

Every enterprise has their own unique need. We need to know that one solution cannot work for all size and types of company. To overcome this, we need a solution that can be easily integrated with other solutions. Given below are a host of such integration options in the Drupal ecosystem:
 

Enterprise Search

Apache Solr: Apache Solr Search module can be used as a replacement for core content search and boosts features as well as performance. Additional features can be added as per the project requirement by extending the module. Valuebound contributed two modules in the process - Multisite Solr Search and Custom Solr Search. 

Ankiro: Ankiro - a search solution - provides user-friendly search tools by using a unique combination of language databases and enabling users to find exactly what they are looking for. Ankiro Enterprise Search Integration module help s with the integration with Drupal.

Sajari Search: Sajari Search is a highly customizable search engine for complex web applications. Search API Sajari module helps to integrate Sajari with Drupal for enabling its use from PHP.

Inventory management 

Commerce Brightpearl module integrates Brightpearl to Commerce Stock and Drupal Commerce allowing retailers to manage orders, inventory, customer data and accounting in a single, reliable retail management system.

Oracle Integration module is used to connect to Oracle databases using Drupal's familiar database functions and classes. Oracle Driver, another module, also allows Drupal to use an Oracle Database as the primary backend.

Stitch Labs API module provides API integration with StitchLabs.com which is an inventory and order tracking platform.

Payment Gateway

Paypal: Commerce PayPal module integrates Paypal into Drupal Commerce payment and checkout system. It supports both off-site and on-site payment systems.

Braintree: Commerce Braintree module is used to add Braintree payment functionality to Drupal Commerce for payments and to store customer data in the Braintree vault for future processing.

Cashpresso: Commerce Cashpresso integrated with Drupal Commerce gives users an option for easy payment in installments.

Amazon Pay: Amazon Pay makes it easy to log-in and pay through your Amazon account in an E-Commerce site based on Drupal. Commerce Amazon Pay module integrates Amazon Pay and lets you log into Amazon with Drupal Commerce.

Paytm: Commerce Paytm module integrates Paytm with Drupal Commerce payment system, for hassle-free e-commerce payments in India.

Order Fulfilment Services

Order Management Systems (OMS): Commerce Fulfilment via OMS module integrates Drupal Commerce with OMS and is being used for production. It currently provides web services like ExportOrders, GetStockOrders, and CreateSalesOrder.

Shipwire: UC Shipwire module allows shipping integration of Ubercart and Shipwire with various API methods like order placement, real-time stock update, and status tracking.

Shipping Gateway

FedEx: By extending Commerce Shipping API, Commerce FedEx module adds FedEx shipping calculations functionality with  Drupal Commerce. 

ShipEngine: Commerce ShipEngine provides the rates for services configured for ShipEngine. It also delivers labels that are visible on order page.

United Parcel Service (UPS): Requiring a UPS.com account, the Commerce UPS module allocates  UPS shipping estimates in conjunction with the Commerce Shipping and Commerce Physical modules.

DPD Shipping: If you are looking for France-based parcel delivery service, Commerce DPD shipping module will enable the most common DPD shipping services to your Drupal Commerce Site. It includes sub-modules like "commerce dpd shop delivery"  and "commerce dpd classic predict”. 

E-mail marketing

MailChimp: Commerce MailChimp module adds the e-commerce 360 feature to Drupal Commerce in order to track store statistics for marketing emails sent via MailChimp. Also, MailChimp E-Commerce helps to merge MailChimp with both Drupal Commerce and Ubercart.  

Marketo: Marketo module provides integration between various Drupal components and the Marketo email marketing system. Marketo MA, another module helps your website track marketing automation and capture user data during registration and form submission.

Analytics & Personalization Service

Google Analytics Integration: Personalize Google Analytics Integration module provides integration of the Personalize module with Google Analytics. It can be used to report the activities of Personalize module and Visitor Actions module to Google Analytics as custom events.

SharpSpring: SharpSpring Personalize module makes SharpSpring user data available to the Personalize module for conditional rules. It depends upon the SharpSpring module for tracking data that helps to add sharpspring tracking to your webpage. API credentials can be stored here to be used for other advanced integrations.

Acquia Lift: Acquia Lift Connector module helps firms to bridge content and customer data in order to deliver a tailored experience to customers. This module integrates with the Acquia Lift Service for an enhanced optimization experience on the front-end of your website.

Web Notification

Urban Airship: Urban Airship Web Push Notifications module connects your Drupal site to Urban Airship to deliver live notifications to your site visitors.

Firebase Notification: Firebase Push Notification module implements Google's Firebase Cloud Messaging to deliver notifications to Web and mobile devices. Relying on the Firebase Platform, another module called Google Firebase Push Notification delivers a feature set to send out push notifications to Chrome and other browsers as well as IOS & Android devices.

iZooto: Izooto Integration module adds iZooto Integrations for Web Push Notifications. Izooto allows businesses to create and send personalized notifications to their customers and web users using their mobile devices and desktops.

Integrations with Amazon / eBay: 

Various modules of Drupal that provide integration with eBay and Amazon are:

Amazon Module: Amazon Module helps to achieve product advertising API functionality for Drupal using advertisement API. Its central “Pure API” components interact with Amazon and optional modules to handle expanded data for other features like wishlists, customer reviews, etc.

Amazon Store Module: Amazon Store helps you to have an Amazon Associates Store along with an Associates ID. It provides a window to search content, product pages and also manages a shopping cart.

eBay Integration: eBay Integration bridges Drupal E-Commerce module and eBay. It allows you to create a special type of product, which will be listed on eBay automatically.

Commerce eBay: Commerce eBay module lists Drupal Commerce products on eBay along with automated stock management. 

Drupal has a number of powerful tools to develop e-commerce sites, as we discussed above. It provides integration with various third-party tools at each stage to make your e-commerce site user-friendly. We at Valuebound help developing commerce solutions by combining various sorting options, delivery modes, payment gateways, tax calculations, etc. to best accomplish your tasks.

Need assistance in building an e-commerce site? Get in touch with our Drupal developers today to enhance your site’s user engagement.

How to integrate Google Assistant with Drupal 8

The demand for Voice technology is rising and it is likely to revolutionize the way publishing websites engage with their audience. The Internet-connected virtual assistant is seeing a significant rise, but the question is how publishers can use this tech to grow their audience base and ultimately increase revenue? Here, we will explore how to use Actions on Google for a new project and an existing one followed up by an integration with Drupal 8 website.

Let’s have a look.

Integrating Actions on Google with a device

Integrating Actions on Google with an electronic gadget or smart speakers allow us to trigger voice command to control various Drupal commands such as:

  • Clearing cache
  • Count number of node 
  • Sending an email
  • Run external as well as internal cron
  • Control Drupal application to respond or insite defined action
  • Integrating Google voice assistance with Drupal 8

1->Go to https://console.actions.google.com

  •     Create new Add/import project.
  •     Enter your project name and Country /region. 

Google Assistant app

 

  • Add a new project

Add project on Google Assistant

Create actions on Dialog Flow 

  • Build a Dialog Flow, you will land to given page as per below screenshot.

Google Assistant - Dialogflow

  • Now create a new intent and enter the following details as shown in the screenshot      

Google Assistant - Dialogflow2

Fill below field

  1. User says
  2. Response → Default → “voice control text which can speak”
  3. Select the field of Fulfillment and then save.
  • Now click on Fulfillment.
  • Enable Webhook
  • Enter URL of your controller and save 

Google Assistant_webhook

Module development in Drupal 8

We are creating this module to hit '/ok-google-test’ page and return test reply setup after performing the process.

Create a custom module and a routing file:

Create Controller:

Now go to your bot.
console.dialogflow.com/api-client/#/agent/a128xxxx-711a-4c7f-b6b6-dxxxxxxxxxxx/integrations

You will see the similar screen where you can say clear caches.

Google Assistant_Console dialog flow

With this integration,  we can interact with our voice-enabled devices to use various Drupal functionalities, like cache clear, external cron run, sending mail, and others. Hope now you can integrate Actions on Google with your Drupal website. If you have any suggestions or queries please do comment below.

Below given is the presentation on "Integration of Google Assistant with Drupal".

How Blockchain can help the Media Industry

There is a lot of fuss all around regarding Blockchain Technology - I myself have heard of it a number of times! Even big companies like Google have already started inclining towards building a related technology. It has brought in quite a stir for media and entertainment industry who today are mostly concerned about how it would impact them. 

The Blockchain isn’t a new idea. We’ve already heard of cryptocurrencies like Bitcoin and Ethereum which are both based on the Blockchain model. It is a safer approach to store information, make transactions, perform various functions, and to establish trust. This idea for which a “mystery” designer named Satoshi Nakamoto is credited, surely has the potential to overturn or enhance the growth of any industry.

Still wondering how Blockchain will impact media industry? Have patience, we’ll discuss it later. First, let’s get to know the advantages of a Blockchain-based industry:

  • A quick payment model, which requires the details to be entered only once and later can be distributed over nodes if required.
  • Reducing transaction costs by removing third parties from managing transactions and keeping records.
  • Data Security and Integrity as it is a chain technology where the transfer of data is carried out by a network of servers, making it highly secure.
  • Open source platform which allows anyone with a record on Blockchain to make live interactions.

Impact of Blockchain on Media Industry:

By 2020, Blockchain shall reduce many enterprise security efforts of validation and verification for all sectors including the media industry. It will provide a digital decentralized ledger system for them which is tamper-resistant and encrypted - so transactions can’t be faked. This makes it a great choice for the media industry in many ways:

  • Crowdfunding with ICOs: Blockchain based sectors are generally funded with Initial Coin Offerings (ICOs) which use cryptocurrencies like Bitcoin. ICOs can also be employed by creative sectors like media for crowdfunding. These ICOs when used for crowdfunding, can help keep a record of all funding transactions that can be utilized later in real-time.
     
  • Digital Advertising: Digital advertising can be enhanced as this ledger system is transparent and highly encrypted, there are no chances for ad frauds. This technology will ensure that the consumer data is better protected because of the added security that it comes with, making it trustworthy. Earlier, knowing the consumer details such as age, earnings, and other details required a lot of time, but with the implementation of Blockchain technology, marketers can directly build customer profile based on the details entered.
     
  • Distribution Mechanism: Digital rights expression is a major target for all media industries. So, to tackle the problem of piracy in digital marketing, Blockchain provides frictionless monetization of content. This helps to establish a legal distribution mechanism.
     
  • Real-Time Sales Data Analytics: With a database of all transactions carried out within an institution, Blockchain can provide a way for media industries to keep a track of all affairs carried out in real-time.
     
  • Payment Royalties: Blockchain is proving itself to be a foundational technology that will help to achieve sales transparency for all folks related to media. Rather than passing through a number of intermediaries, royalty payment mechanisms can now become instantaneous.
     
  • Monetization of Micro-Contents: An advantage of Blockchain technology is that payments can be divided into smaller parts. This means that the customers can divide their payments according to the size of content they want to interact with. Example, buying a single track instead of the whole song album in Apple’s iTunes.

How Drupal comes into the picture?

Just like Drupal, Blockchain is an Internet-based, open source platform for digital assets, supported by a large community. This ledger technology helps to implement an additional trust layer to the use of payment over internet whereas Drupal can provide an identity and recognition to all user groups. It can also implement enterprise level workflows required for document signing, asset tracking, etc.

The implementation of Blockchain technology can surely help with secured payments across various websites. Here Drupal acts as a mediator, bridging the gap between end-user communities.

Integrating Ethereum with Drupal

Ethereum is a Blockchain-based technology that allows you to write decentralized applications using smart contracts and the Ethereum Virtual Machine. It is a ledger system that requires the use of service or setting up one’s own network node. The codes used in Ethereum are deployed to Blockchain.

Drupal’s Ethereum Module helps to enable integration between Ethereum blockchain and Drupal. This module intends to be a repository, where various modules that help in integration between Drupal and Ethereum Blockchain can be added. It also includes submodules like Ethereum User connector, which allows Drupal users to verify an Ethereum account address.

Ethereum module will configure applications with Smart Contracts along with connected Drupal functionality. Drupal and Ethereum are planning to implement the JSON RPC Ethereum API which is developed next to this module as an Ethereum PHP library.

In this era of digitalization, it has become a necessity to provide customers an encrypted and secure ledger platform like Blockchain to ensure their trust. And, this technology is not just a new digital currency system but also a revolution in many industries like media, where major flaws in the management system like piracy can mean considerable losses. Although this technology will need time to gain full support and trust, it surely has the potential to bring in a major transformation in the whole economy.

By leveraging our extensive experience in the Drupal framework, we at Valuebound provide you with the best solutions for web development. Contact us to know more!

Visualising Drupal Security Advisory Data

Drupalgeddon 2.0 brought a lot of focus on the Drupal security initiative and its practices. The way the security team disclosed this vulnerability and communicated to developers, community and press were proactive and commendable. Further, the communication was continuous.

The vulnerability, which started off with a risk score of 21/25 on 28th March, was upgraded to 22/25 on 13th April and was finally marked as 24/25 on 14th April. If you are interested to know what was changed during this interval - you can check out the revisions and compare them yourself here.

One thing we observed, recently, that in spite of all these disclosure and announcements not many Drupalers were aware of the details and terminology. Though security risk levels were well defined on Security Risk Level Definitions Page, it looked like not many are reading it in detail. This intuition is based on a sample survey of around 100 developers from three different cities in India. While it may not be an actual representation it still highlights a problem that needs to be addressed. It would be great if Drupal Association adds this question on one of their surveys. 

“Have you read defined security risk levels” with options of Yes and No. 

This may give us more insights. If developers themselves are not aware of these details then I believe it is too much to expect from site-builders to take corrective actions. So we created a crude static file that can make it easy for humans to understand - what the security string like 24∕25 AC:None/A:None/CI:All/II:All/E:Exploit/TD:Default means. While the security score is pretty much self-explanatory it is the second part that generally stumps many people.

You can check it out on https://nkgokul.github.io/drupalsecurity/. Once you enter the security string like “24∕25 AC:None/A:None/CI:All/II:All/E:Exploit/TD:Default” it will give a description that humans can easily understand. It is a very crude version without any validations. Would be great if anybody can clean it up.

Once this was done we wanted to do a basic analysis to figure out - how Security Advisories have been released till date? and what were the security scores of each of these advisories? Though official Security track record has some details, it was not up to date and was not in detail. So we set out to gather the data. Though there were various API endpoints like

https://www.drupal.org/api-d7/node.json?type=sa&status=1
https://www.drupal.org/api-d7/node.json?taxonomy_forums=1852  
https://www.drupal.org/api-d7/node.json?taxonomy_forums=1856

We felt it was too much of work to normalize the data from these endpoints. So we took a different approach to scrape the data from security advisories. Just to let you know it was not a straightforward job and was not as easy as we initially thought it would be. We scraped the advisories using our good old Google docs and some queries.

Since the data was inconsistent we had to use different queries based on the different time windows during which these announcements were made. After doing an initial round of scraping we did some data manipulations to get all the relevant data in the format we required.

The next challenge was that two different formats were used while sharing the security advisories. Post 6th August 2014 NIST Common Misuse Scoring System (NISTIR 7864) mechanism was used for categorizing the vulnerabilities and scoring them so that the data should be structured properly. Before that Drupal team had its own way of classifying the vulnerabilities.

You can read about security risk levels at Drupal.org 

In order to have meaningful insights, we gave the security risk score for vulnerabilities that were reported prior to 6th August 2014. So based on the new guidelines and the security risk level assigned to the vulnerabilities, announced before the date, we did a reverse mapping.

For highly critical we gave a rating of 22.5, Critical - 17, Moderately Critical - 12, Less Critical - 7 and Not Critical - 2.

Though these numbers were not accurate, they gave us a broad sense. To have an exact scoring we need to have a rating for each of the six risk metrics defined in NISTIR 7864. This can be time-consuming. Hence we put it on hold for now. It would be great if somebody can rate the old SAs as per the new guidelines. If you would like to take a dig at it you are free to do it here - Drupal core vulnerability analysis. All users have edit access. So please go ahead and update the Columns H to M that are marked in orange color and have the text “Details not available”. Once you are done with it you can also update the column G and you can use these values in https://security.drupal.org/riskcalc to find out the Risk Score.

With the data currently available, we made some visualizations. Have a look.

Drupal Risk Score vs Date

This was created using Google spreadsheet. As you can see the number of SAs have reduced over the time and it is especially interesting to note that vulnerabilities with the score less than 10 have minimized drastically post January 2010. I am not sure if this could be attributed to automation tools that were around that time.

Using the data from Google spreadsheets, we created a couple of interactive maps in PowerBI.

Drupal security analysis 1Drupal security analysis 2

You can check out these interactive maps here.

Special thanks to Gokul for contributions to this blog post.

Highlights from DrupalCamp Mumbai 2018

DrupalCamp Mumbai 2018 is just around the corner and we are all set for it. This year we are excited to support DrupalCamp in Mumbai as both Gold sponsors and attendees. The camp is returning to Indian Institute of Technology Bombay. The three-day camp consists of Drupal 8 workshop on Friday 27th April, keynote session as well as various talks on 28th April. The 2018 Camp will conclude with sessions, code sprints followed by a vote of thanks and closing ceremony. 

During the camp, you can catch the Valuebound team presenting the following sessions:

Drupal 8 Plugin API

We all know that Drupal 8 introduced many new APIs. The Plugins API is used to extend Drupal and add new functionality that allows modules to define new plugin types. In this session “Drupal 8 Plugin API”, Drupal consultant Manoj K will discuss on various agendas like:

  • Things you need to know before creating Plugin
  • When to use Plugin or Service
  • Plugin vs Info Hooks
  • Example of pluggable components
  • Plugin discovery types
  • How to create your own Plugin Manager

Package Your Solution Using Drupal Distributions

In this session, Drupal consultant Girish V and Pavan B S will talk about the powerful Drupal distributions or installation profiles. They will also cover how distribution can reduce the development hours by giving you a head-start for your project.

The session will cover the topics around building a distribution:

  •   What is a Distribution or Installation Profile
  •   What can be packaged inside a Distro
  •   How it is beneficial as a starting point
  •   When do we need to think about architecting an installation profile
  •   Popular Distributions present in the market

The session will be followed by a brief demo of creating a basic installation profile using Drupal 8. 

Too Many Project Methodology Can Spoil Drupal Projects

What happens when you start working on a project which turns your way of working upside down? How do you keep your sanity and support your team while keeping your client happy? Everything is different, from deployments and workflows to conflicting Scrum methodology. Many people try to wear a Project Manager hat, however, few deliver the project successfully on deadline. Here the bottleneck is a timebox. 

In this session, Scrum Master  Nikhil Anant will share his first-hand experience how he and the development team fixed the clients woes and what worked for them. The various agendas of this session are:

  • Project Decision Tree
  • Choosing the right team members
  • Tradition Vs Agile approach
  • Plan-Do-Check-Act
  • Retrospective
  • Where are we going? 
  • Take a break
  • Bounceback

So how can you connect with the Valuebound team 

Well, the easiest way is to stop by our booth in the exhibition area. Join the Valuebound team and fellow Drupalists to learn about our open positions and grab some goodies!

Drupal highly critical vulnerability - DrupalGeddon 2 - We've got you covered

This blog post attempts to focus on the highly critical vulnerability that was announced by Drupal on 28th March tagged as SA-CORE-2018–002, Drupalgeddon 2.

Recently, Drupal core announced a security advisory rated as highly vulnerable - dubbed DrupalGeddon 2 (SA-CORE-2018-002 / CVE-2018-7600) - that has the potential to affect the vast majority of Drupal 6, 7 and 8 websites.

According to BuiltWith, around 9% of websites are running on Drupal and hence had a high probability of being affected by the vulnerability as the score is 24/25.

SA-CORE-2018-002 potentially allow attackers to take full control of any affected Drupal site that could result in the site being completely compromised. The vulnerability was initially scored 22/25 but was later raised to 24/25 as there were proofs of automated attacks in the wild.

The risk metrics for this vulnerability are as follows AC:None / A:None/ CI:All / II:All / E:Exploit / TD:Default. You can read the article about security risk levels to know more about the details of the risk metrics. In short, SA-CORE-2018-002 means:

  • AC (Access Complexity): None - It is very easy for the attacker to leverage the vulnerability.
  • A (Authentication): None - No privilege level was required for the exploit to be successful. Meaning even anonymous users could exploit the vulnerability.
  • CI (Confidentiality impact): All - All non-public data was accessible because of the vulnerability.
  • II (Integrity impact): All - The data could have been easily modified or deleted.
  • E (Exploit) - An exploit is known to exist or is documented.
  • TD (Target distribution): Default - The default configurations were likely to be affected.

If you are curious to know how the score (24/25) was obtained you can take a look at Risk Calculator. This calculator takes six different metrics, which can have three different values. This gives an objective sense of the risk of different issues. While the numeric value gives you a sense of how critical the issue is. The security risk string, for example, “AC:None/A:None/CI:All/II:All/E:Exploit/TD:Default”, gives you a sense of six different risk factors that are considered in this case. This provides a better sense of how vulnerable your site is. Also, you are the right person to evaluate since you know how your website is structured and built, and how vulnerable it is to these specific risk factors. 

FYI, SA-CORE-2018–002 is as critical as “DrupalGeddon” episode which came to light in October 2014. To put things in perspective since 6th August 2014 (the date when NIST Common Misuse Scoring System - NISTIR 7864 was used by Drupal) there have been only three highly critical issues that have had a score of more than 23. 

Our approach

In response to this latest vulnerability, we gathered our development team to make sure we can deploy patches to this vulnerability for all our clients’ websites. We implemented a standard plan to notify all clients about the security update and to execute it across all of our supported sites immediately.

So when the patch - 8.5.1 / 8.4.6 / 8.3.9 / 7.58 - was available, our team knew exactly what to do. Just to let you know, the security update was carried out successfully as quickly as possible. Thanks to our team, at Valuebound, who worked tirelessly to ensure that all our clients’ websites were patched within hours.

If you are interested to know more how Valuebound can help you with security and maintenance of your Drupal website, do explore our services.

Read more at FAQ on SA-CORE-2018-002.

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