Back to all posts Back

Introducing PartnerJS – A New Way To Add More Flexibility to Your Experimentation Program

best friends partnerjs taplytics

We’ve listened to feedback from our agency partners and have built a nifty new feature to allow any javascript code to run from Taplytics every time the SDK script is loaded without having to deploy to production code.

We’re calling this new feature PartnerJS as it enables partners and product teams to run any Javascript without having to touch production code. With PartnerJS you can run any Javascript code before our Javascript SDK starts to enable more flexibility in how you track, QA and run your experiments.

Some example use cases are:

  • Ability to track reusable custom goals (such as scroll-depth and mouse hover) without having to include the javascript in experiments
  • Run experiments on single-page applications (SPA) without having to reload the page
  • Build custom integrations with other platforms outside a partner’s analytics ecosystem
  • Ability to set a custom cookie to debug for easily reproducible QA before an experiment goes live

How It Works

The Javascript that is defined will be prepended to our JS SDK script within a try/catch so that any runtime errors are caught.taplytics js sdk try catch

This means that the defined script will be run every time our Javascript SDK script is loaded, before anything else in the SDK.

What you should expect is that this will run on every page load given that the script is loaded on every page load. For SPAs, our latest SDK has an option to detect page changes and reloads the script, so it will be run every time.

We currently have a textbox input for entering javascript in your Project Settings. Syntax error validation is done client side so you will know if the script is invalid before it is able to save.

Ready to give PartnerJS a shot?

Really, the possibilities are endless when you have the flexibility to run any valid javascript code outside of production code to empower partners and stakeholders to drive more value from Taplytics. With PartnerJS, you’ll have a seamless way to QA, run experiments and gain business insights when everyone has the right amount of access to build a better product.

Interested in learning more? Please feel free to contact our technical support team at support@taplytics.com for a customized walkthrough, or reference our docs here.