Send data to multiple applications

Last updated:

If you have a direct web implementation of Pendo, you can send event data from a single product to multiple Pendo applications by including additionalApiKeys:[] in your install script. These applications may or may not be in the same subscription.

Example use cases

Use additionalApiKeyswhen you want a single install script to report to more than one Pendo application. Common scenarios include:

  • Shared platform or multi-product company — One core web app powers multiple products or business units, each tracked as a separate Pendo application. Adding additionalApiKeys sends usage data to all of them without duplicating the install script across codebases.
  • Vendor, OEM, or white-label products — A software vendor embeds its product in a customer's environment. The vendor wants analytics in its own Pendo subscription, and the customer wants the same usage data in theirs. additionalApiKeys lets both subscriptions receive the same event stream from one install.

If you use Pendo Launcher (browser extension) instead of a direct web install, you can send data to multiple subscriptions as well — for example, when a company has separate Pendo subscriptions per region or business unit. This uses a different configuration path (the Launcher managed config) rather than the install script covered in this article. For more information, see Send data to multiple subscriptions.

This additionalApiKeys configuration is different from a multi-app subscription, where each product has its own application and Public App ID. Every Pendo subscription has a default application and can contain additional applications. An application in Pendo is usually a standalone product or a part of a more complex product, and typically aligns with a single platform, such as web, iOS, or Android. If you're adding Pendo to a new product, follow Add more web apps or Add mobile apps to generate a new application instead. Learn more about Multi-app subscriptions.

How it works

To send data from one install script to multiple applications, update your install script by adding the additional Public App IDs to your primary application's code.

The applications that you send this data to must be in the same data environment, which can be either US, US1, EU, Japan, or Australia.

Admin users can find the install script for an application in the install settings for that application:

  1. Go to Settings > Subscription Settings > Applications.
  2. Choose the application from the Applications list.
  3. Open the Install settings tab.

The install script includes a primary Public App ID (the primary application). For more information about the Public App ID, see Components of the install script.

Adding multiple Public App IDs to your install script allows you to send the same product usage data to multiple applications. Analytics events, such as page views, clicks, and focus events, are sent to all listed applications. Session recordings and click event properties are only sent to the primary application.

Guides also depend on the primary application. A user only sees guides that are configured in the primary application. If you configure a guide in one of the additional applications, it won't display to that user.

For example, the following code sample in Update the install script usesPUBLIC_APP_ID_APP1as the primary Public App ID (primary application). Guides configured in this application are visible to users, but guides configured in PUBLIC_APP_ID_APP2, PUBLIC_APP_ID_APP3, or PUBLIC_APP_ID_APP4 won't display. All four applications still receive page load, click, and focus events.

Update the install script

To send data to multiple applications, edit the install script for your primary application to include additionalApiKeys:[] within the pendo.initialize({}) method call in your install script. For example:

(function(publicAppId){    (function(p,e,n,d,o){var v,w,x,y,z;o=p[d]=p[d]||{};o._q=o._q||[];    v=['initialize','identify','updateOptions','pageLoad','track','trackAgent'];for(w=0,x=v.length;w<x;++w)(function(m){        o[m]=o[m]||function(){o._q[m===v[0]?'unshift':'push']([m].concat([].slice.call(arguments,0)));};})(v[w]);        y=e.createElement(n);y.async=!0;y.src='https://cdn.pendo.io/agent/static/'+publicAppId+'/pendo.js';        z=e.getElementsByTagName(n)[0];z.parentNode.insertBefore(y,z);})(window,document,'script','pendo');
        pendo.initialize({
            additionalApiKeys: ['<PUBLIC_APP_ID_APP2>', '<PUBLIC_APP_ID_APP3>', '<PUBLIC_APP_ID_APP4>'],
            visitor: { },
            account: { }
        });
})('<PUBLIC_APP_ID_APP1>');
Was this article helpful?
3 out of 3 found this helpful