npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@parameter1/base-cms-marko-web-omeda-identity-x

v4.63.0

Published

Marko Omeda+IdentityX integration tools

Downloads

6,675

Readme

BaseCMS Marko Omeda+IdentityX Integrations

Omeda+IdentityX components for BaseCMS/Marko websites.

Based on the identity provider(s) in use, install and configure only one of these packages. The other packages can be installed separately if needed, but this package should be the only one configured.

  1. omeda-identity-x: For sites with both Omeda and IdentityX.
  2. omeda: For sites with Omeda, but without IdentityX.
  3. identity-x: For sites with IdentityX, but without Omeda.

Additional information can be found in the Omeda and IdentityX API documentation.

Configuration

All configuration data must be passed to the middleware when loaded (See Middleware Setup below.)

| Property | Required? | Description | Default value | | - | - | - | - | | brandKey | Yes | The Omeda Brand key (such as orgcd). | clientKey | No | The Omeda client key (such as client_orgc.) Required if sending deployment optIns via the underlying omeda package! marko-web-omeda docs | appId | Yes | The Omeda application API read token | inputId | Yes | The Omeda application API write token | rapidIdentProductId | Yes | The Omeda identifier for a Website product (ProductType=7). | idxConfig | Yes | An instance of the IdentityX configuration class (see marko-web-identity-x#1) | n/a | idxRouteTemplates | Yes | An object containing the Marko templates to use for each IdentityX endpoint. (see marko-web-identity-x#2) | omedaPromoCodeCookieName | No | The name of the cookie to look for a persisted/original promo code. | omeda_promo_code | | omedaPromoCodeDefault | No | The default promo code to send with all Omeda requests. Falls back to input ID default configured by Omeda. | | idxOmedaRapidIdentifyProp | No | The property (in the express app context) where the O+IdX rapid identification service is located. | $idxOmedaRapidIdentify | | omedaGraphQLClientProp | No | The property (in the express app context) where the Omeda GraphQL client is located. | $omedaGraphQLClient | | omedaRapidIdentifyProp | No | The property (in the express app context) where the Omeda rapid identification service is located. | $omedaRapidIdentify | | appendBehaviorToHook | No | An array of objects defining behaviors to append to rapid identification calls. | appendBehaviorToHook[].hook | | The name of the hook, such as onLoginLinkSent | appendBehaviorToHook[].behaviorId || The Omeda Behavior ID to append to the rapid identification call. | appendDemographicToHook | No | An array of objects defining demographics to append to rapid identification calls. | appendDemographicToHook[].hook | | The name of the hook, such as onLoginLinkSent | appendDemographicToHook[].demographicId || The Omeda Demographic ID to append. | appendDemographicToHook[].valueIds || An array of Omeda Demographic Value IDs (Ints) to append | appendDemographicToHook[].writeInValue || A string to include as an OEC/Other value | appendPromoCodeToHook | No | An array of objects defining demographics to append to rapid identification calls. | appendPromoCodeToHook[].hook | | The name of the hook, such as onLoginLinkSent | appendPromoCodeToHook[].promoCode || The Omeda Promo Code (String) to append.

Usage

This package:

  1. Configures the underlying omeda and identity-x packages
  2. Hooks into the IdentityX library to push Omeda data to IdX and push IdX data to Omeda when profile updates happen
  3. Makes the rapid identification endpoint (/__idx/omeda-rapid-ident) available on a base-cms website
  4. (Optional) Provides a Vue component to call the rapid identification endpoint

1. Middleware Setup

To make the local omeda mountpoint available, load the middleware exported by this package. For most applications, this will be done in the startServer function passed to the marko-web package.

See config section above and the Omeda and IdentityX package documentation for available configurations.

const handler = require('@parameter1/base-cms-marko-web-omeda-identity-x');
const omedaConfig = require('./config/omeda');
const idXConfig = require('./config/identity-x');
const idxRouteTemplates = require('./templates/user');

startServer({
  onStart: async (app) => {
    handler(app, {
      ...omedaConfig,
      idxConfig,
      idxRouteTemplates,
    })
  },
}

It can also be loaded as a standard Express route middleware.

module.exports = (app) => {
  handler(app, { ...omedaConfig, idxConfig, idxRouteTemplates });
};

2. Rapid Identification

To use the Rapid Identification hook, load the Vue component in your Browser config. When enabled, the Omeda Rapid Identification API will be called automatically when the oly_enc_id URL query parameter is present.

import OmedaIdentityX from '@parameter1/base-cms-marko-web-omeda-identity-x/browser';

export default (Browser) => {
  OmedaIdentityX(Browser);
};