An action type library module is intended to take an action–any action. What this action is up to you. Do you want to send a beacon, show an offer, thank the user for visiting, save a cookie, or open a support chat?

Let’s assume we want to show an alert thanking the user for visiting our site. Our module may look like this:

module.exports = function(settings) {
  alert('Thanks for visiting our site!');

Now what if we wanted to make the message configurable by the Launch user? In our view we would allow the user to input a message and then save the message to the settings object. The object might look something like this:

  "message": "Thank you for being one of our VIP members!"

In order to operate on the user-defined message, our module would need to change to this:

module.exports = function(settings) {