Skip to main content

JavaScript SDK Beta 3

· 2 min read
Mike Stead

We've made a couple of breaking changes in a recent release (v1.0.0-beta.3). This guide will walk you through what they are and how to upgrade.

As the JavaScript SDK is in a pre-release state, we've made these breaking changes directly. Once we pass pre-release, all versioning will follow Semver major.minor.patch to reduce this type of impact.

What's changed#

Session identify and anonymize#

Our SDK will now send extra properties to our platform when session.identify or session.anonymize is called.

If these properties are not sent, the calls will be rejected by our platform. This will go into effect as of Thursday 26th March at 6pm PDT.

Please let us know as soon as possible if this may cause issues.

Client configuration#

Previously, the SDK client was configured using the configure function.

client.configure({  sessionLock: false,  waitTimeMsec: 1200,});

This function has been removed and you can now set client properties directly.

client.sessionLock = false;client.waitTimeMsec = 1200;

Code generation folders#

When running the CLI commands mtribes setup or mtribes update, Collection, Section and Experience types were generated into a single templates folder under the root codegen path e.g.

mtspace/spacename/templates

This folder has been removed, and template types are now generated into their associated folders.

mtspace/spacename/  - collection/  - section/  - experience/

Upgrade steps#

  1. Upgrade your mtribes CLI

    • osx: brew upgrade mtribes
    • win: scoop update mtribes
  2. Regenerate the integration code: mtribes update

  3. Remove any calls to client.configure and replace them with the direct setting of client properties.

  4. Replace any imports in your code targeting the generated templates folder with the relevant categorized folder, collection, section, or experience.