@mparticle/web-optimizely-kit

2.1.6 • Public • Published

integration-optimizely

Overview

This integration contains code that maps to both Optimizely Web and Optimizely Full Stack. Depending on your use case, the kit is flexible enough so that you can either use 1 of these products in isolation or both at the same time. To use both concurrently, simply add 2 Optimizely connections in the mParticle UI, and check Use Full Stack in one of them.

Documentation

Please view the Optimizely Integration docs for full set up instructions.

Development Notes

Normally, mParticle kit code maps mParticle events to a single product/SDK. However, as mentioned above, this mParticle Optimizely kit enables mapping an mParticle event to 2 Optimizely products/SDKs. As such, all mapping code must follow 2 different code paths. In each module under src/, you'll find that code is split between products with code that looks something like the following:

if (window.optimizely && !common.useFullStack`) {
    // Perform mapping for Optimizely Web
    // window.optimizely checks for existence of Optimizely Web's API
    // common.useFullStack is an explicit check for if the connection is for Full Stack
}

// OR

if (window.optimizelyClientInstance && this.common.useFullStack) {
    // Perform mapping for Optimizely Full Stack
    // window.optimizelyClientInstance checks for existence of Optimizely Full Stack's API
    // common.useFullStack is an explicit check for if the connection is for Full Stack
}

When updating this kit, be sure to follow the correct code paths where appropriate.

License

Copyright 2020 mParticle, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Dependencies (2)

Dev Dependencies (18)

Package Sidebar

Install

npm i @mparticle/web-optimizely-kit

Weekly Downloads

310

Version

2.1.6

License

Apache-2.0

Unpacked Size

36.9 kB

Total Files

3

Last publish

Collaborators

  • mparticle-teamcity
  • samdozor
  • rmi22186
  • peterjenkins
  • danhendrix
  • tbreffni
  • alexs-mparticle
  • willpassidomo
  • bstalnaker
  • mparticle-ci