pe_token when needed. Embed v2 can also show Campaigns announcements to identified members.
Open My app
- Go to Integrations in the Workspace nav.
- Select My app.
- Create an embed key with a label and allowed origins (your app’s HTTPS origins).
- Copy the embed token when shown — it is revealed once.
Install the embed snippet (v2)
Prefer/embed/v2/pe-embed.js so identify and the Campaigns messenger stay current. Paste the snippet from Integrations → My app (or the example below) into pages where users should be identified. Replace placeholders server-side with the signed-in user’s id, email, and profile fields.
data-pe-portal-link merges ?pe_token= when users open the portal.
If you use a verified custom domain (Pro), point data-pe-portal-base-url and portal hrefs at that same origin everywhere.
Campaigns in your product
With embed v2, eligible App campaigns can appear as a bottom-right announcement widget after identify succeeds.- How to show Campaigns with the embed
- Disable or preview campaigns (
data-pe-disable-campaigns="1"or?pe_campaign_preview=…)
Member tokens and pe_token
The embed flow mints short-lived member tokens so the portal knows who is signed in. Links that includepe_token keep member-only portal behavior (submit feedback, vote, etc.) aligned with your product’s user.
Checklist
- Serve the snippet only from allowed origins you configured.
- Never expose embed secrets in a public git repo.
- After changing custom domain settings, update deployed embed attributes so origins match.
- Use embed v2 if you want in-app Campaigns.

