Skip to main content

Embed Advocacy in Gainsight Communities

T
Written by Tom Aristone

Embed your UE Advocacy hub directly inside a Gainsight Communities page so members can complete missions, earn rewards, and track their activity — without leaving your community.

Before you start

  • You’ll need admin access to both your Gainsight Communities workspace and your UE Advocacy admin panel.

  • Ask your UserEvidence CSM to turn on embed sessions for your account. This is a one-time step on our side.

Part 1: Admin setup (one-time)

1. Create an embed token in UE Advocacy

  1. Go to Integrations → Token Management and click New token.

  2. Name it something you’ll recognize, for example Gainsight community embed.

  3. Set Role to Advocate sessions (embed).

  4. Set Integration source to Gainsight.

  5. Click Create token and copy it right away. It’s only shown once.

This token can only sign members in to the hub. It can’t read or change any of your data. Treat it like a password: only put it in your Gainsight connector settings, never in page HTML or the widget script. You can revoke or replace it any time in Token Management.

2. Add the API connection in Gainsight

  1. In Gainsight, go to Integrations → Connectors and add a new API connection.

  2. Set the permalink to zealot.

  3. Set the method to POST and the URL to: https://api2.joinzealot.com/api/v2/fanUsers/embed

  4. Add these headers:

    • Authorization → Bearer [paste your embed token here]

    • Content-Type → application/json

  5. Set the request body to: {"email": "{{ user.email }}"}

You don’t need a Brand ID. Your token identifies your account.

3. Add the widget to your page

Go to the page where you want the hub. Edit the page (or add a new tab), click Other → HTML Widget, and paste this script:

<div id="widget-container"></div> <script src="https://static.customer-hub.northpass.com/widget-sdk/latest/index.umd.js"></script> <script> (async () => {   const sdk = new window.WidgetServiceSDK();   const container = document.getElementById('widget-container');   try {     const result = await sdk.connectors.execute({       permalink: "zealot",       method: "POST"     });     const iframe = result?.data?.iframe;     if (typeof iframe === 'string') {       container.innerHTML = iframe;     } else {       console.warn('Unexpected result format:', result);       container.textContent = 'Unable to display widget.';     }   } catch (err) {     console.warn('Advocacy embed failed:', err);     container.textContent = 'Unable to display widget.';   } })(); </script>

4. Publish

Click Done, then Publish. The advocacy hub now appears for every signed-in community member.

Part 2: What members will see

Members see the full advocacy hub inside the page, with no separate login. They can browse and complete missions, track points and rewards, submit referrals and reference requests, and use their personal advocate dashboard.

How sign-in works: when a member opens the page, Gainsight securely sends us their community email, and we sign them in to the hub. Members who aren’t advocates yet get an advocate profile automatically on their first visit. Each session lasts 30 minutes and a new one starts on every page load, so members only need to refresh if they leave the page open for a long time.

Part 3: Troubleshooting

To see the error behind a problem, open your browser’s developer tools and check the Network tab.

  • “Unable to display widget”: make sure the widget script matches the one above exactly. It must use method: "POST" and read result.data.iframe.

  • 403 BRAND_EMBED_NOT_ENABLED: embed sessions aren’t turned on for your account yet. Contact your CSM.

  • 403 LEGACY_MINT_NOT_ALLOWED: your connector still uses the old setup. Update it to match Part 1, step 2.

  • 401 Unauthorized: the token is missing, mistyped or revoked. Create a new one in Token Management and update the Authorization header.


Questions? Reach out to your UserEvidence customer success manager or email [email protected]

Did this answer your question?