This article covers the process to configure the Pendo Launcher extension on the Firefox web browser on a Mac computer using Mozilla’s native manifest functionality. Native manifests apply to both Windows and Mac devices, but the process for implementing them is different for each OS. The process described in this article can be used to configure the following types of data:
- API Key
- Visitor ID
- Metadata
For complete documentation on native manifests in Firefox, see Mozilla's Native manifests: Native messaging manifests documentation.
Prerequisites
Before configuring the extension on end-user devices, you must first install it on end-user browsers. See the IT guide to deploying the Pendo Launcher for all installation options.
We also recommend reading the Plan your Adopt installation article before running any deployment steps.
Step 1. Create a shell script
Adjust the following template script to include your own value for the API_KEY
field and, if required, correctly capture your Visitor IDs and metadata.
Find your API key
Find the API key by navigating to Settings > Subscription. Your unique extension API key is displayed at the top of the page and looks something like the following:
{
"APIKey": {
"Value": "c022bb1e-676d-4c58-731c-caf13fe12a89"
}
}
Insert values into the template
In this template example, the current username is captured in the variable currentUser
. The email domain example.com
is appended to create the visitor ID, which is then stored in the file: /Library/Application Support/Mozilla/ManagedStorage/pendo-launcher@pendo.io.json
.
You don't have to generate Visitor IDs in this way. The approach you follow for generating the Visitor ID value is determined by the plan you created according to the Plan you Adopt installation article.
#!/bin/bash
# Set the API key
API_KEY="your-api-key-goes-here"
# Get current username
currentUser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ { print $3 }' )
# Set domain name for emails
domainName="example.com"
# Create folder location if not there
dest_folder="/Library/Application Support/Mozilla/ManagedStorage"
if [ ! -d "$dest_folder" ]; then
sudo mkdir -p "$dest_folder"
sudo chown $(whoami) "$dest_folder"
fi
# JSON content
visitor_object='{
"id": "'"$currentUser@$domainName"'",
}'
visitor_string=$(echo "$visitor_object" | jq tostring)
json_content='{
"name": "pendo-launcher@pendo.io",
"description": "Metadata for Pendo Adopt",
"type": "storage",
"data": {
"APIKey": "'"$API_KEY"'",
"visitor": '"$visitor_string"'
}
}'
echo "$json_content" > "$dest_folder/pendo-launcher@pendo.io.json"
If available, additional metadata can be added as keys on the visitor object. For example, if you can determine the current user’s office location, you could pass the following as json_content
:
visitor_object='{
"id": "'"$currentUser@$domainName"'",
"office": "$office"
}'
Step 2. Push your script to end-user devices
Using your MDM tooling, set the shell script to run on end-user devices on a regular basis. Pendo recommends running at least once daily or once every login. However, if there's metadata included in the file that might change periodically, you can increase the frequency to ensure that new data is provided to the browser promptly.
The specifics for running a shell script on end-user devices depends on your company’s MDM tooling. Below is the documentation for some of the most common MDM tools used for Mac devices:
Step 3. Validate your configuration
First, test the script on a single device that you can physically access to verify correct configuration. Validation involves confirming the presence of the native manifest file and validating the correct browser behaviour.
Confirm the presence of the native manifest file
- Open the Mac terminal app.
- Enter the command
cd /Library/Application\ Support/Mozilla/ManagedStorage
. - Enter the command
ls -l
. - Search for the
pendo-launcher@pendo.io.json
to check that it's listed in the output. - Check the contents of the file by entering the command
cat pendo-launcher@pendo.io.json
. Verify that the contents match the Visitor ID and metadata you expect to see.
Validate the browser behavior
Confirm that the browser is correctly reading the contents of the manifest file.
- Open Firefox on the device with the manifest file. If the Firefox app is already running, quit and re-open it.
- Install the Pendo Launcher browser extension on your Firefox browser. If you've already configured force-installation of the Pendo Launcher, you can skip this step.
- Visit any non-Mozilla webpage, such as, https://pendo.io/.
- Right-click on the Pendo Launcher extension icon in the top-right corner of your browser toolbar.
- Select Show Debug Info.
- Confirm that the Visitor ID in the Identified as field is correct.
- Select Show Configuration Info.
- Open the IT-Managed Config dropdown menu and search for your configuration values to check that they're present.