1. Home
  2. Docs
  3. For Developers
  4. Marketing Package Integration

Marketing Package Integration

We’ve written a composer package to empower developers on Pluggable to gather valuable user information and feedback, enhancing their WordPress plugins and improving user experience. Integrating our composer package into your WordPress plugins on Pluggable is crucial for your success. Here’s why:

  1. Know Your Users: You can always know who and what type of sites use your plugins.
  2. User-Centric Improvements: Gather user feedback to enhance your plugin’s user experience.
  3. Enhanced User Experience: Optimize functionality and design based on user behavior.
  4. Iterative Development: Continuously improve your plugin based on user feedback.
  5. Quality Assurance: Detect and address bugs through user monitoring.

Experience the benefits of our composer package for better user satisfaction and plugin success.

Like our license package, the marketing package is also easy to integrate.

Adding The Package

1. Go to your plugin’s directory (e.g. /wp-content/plugins/my-plugin) and install the package by running this command-

composer require pluggable/marketing

2. Include the autoloader in your main plugin file

require_once 'vendor/autoload.php';

About The Modules

This package includes 3 modules for different purposes-

  1. Survey: This module can be used to show an admin notice in the wp-admin area 2 days after installing the plugin. It’ll ask the user to participate in a survey that collects the site URL, user’s name, and email.
  2. Deactivator: If this module is activated, whenever an administrator user tries to deactivate the plugin, it’ll show a popup asking why they are deactivating. Then the feedback will be stored in our database and you can see the report right from your developer dashboard.
  3. Feature: This experimental module shows some recommended plugins when the administrator user goes to the plugin search page from Plugins > Add New.

Enabling a Module

Once the package is installed and the autolaod.php file is included, you can simply instantiate a module by calling its class name and passing the plugin file reference.

For example, if you want to enable the Deactivator module, add this code to your main plugin file-

use Pluggable\Marketing\Deactivator;

new Deactivator( __FILE__ );

The same goes for the Survey and Feature modules- new Survey( __FILE__ ); and  new Feature( __FILE__ ); respectively.

While it’s not mandatory to use the Marketing modules for your plugin, we highly recommend you integrate this and enhance user experience as well as ensure your plugin success.

Tags , , , , , , ,

How can we help?