Web embedding helps you incorporate specific Cosmos React landing pages and case experiences into your existing web assets regardless of your current adopted front-end framework.
Unlike the Pega web mashup which uses <iframe> components, the web embed in a Cosmos React application relies on HTML5 Web Component. This standard
provides a means of defining custom full-fledged HTML elements, such as the
pega-embed tag in the following example:
<script src='https://static.pega.com/pega-embed.js' ></script> <pega-embed id='theEmbed' action='createCase' caseTypeID='OPB1HW-Compass-Work-NewFeedback' appAlias='compass' pegaServerUrl='https://sample.pega.com' staticContentUrl='https://static.pega.com/' authService='pega' clientId='55781676112059009508' > </pega-embed>
the element must be loaded onto the web page. This is accomplished by the HTML
script reference to
- The web embed code requires a start tag with assorted attributes and attribute values and an end tag.
- Web Components tags work only when the page is served from a web server that
https:protocols. Local HTML files that use Web Component markup are not supported.
- Creating web embed
Embed existing Microjourney experiences within any web page or application. For example, you can embed a feedback form within your website so that the users who access the page can share their comments.
- Custom code in the web embed snippet
The web embed snippet that you generate on the Web embed channel page is ready to use out of the box. However, if your business case requires that the web embed behave in a more complex manner, you can edit the snippet manually and expand it to use additional supported attributes.
- Troubleshooting web embeds
Ensure that your web embeds work as intended by learning about potential issues and their resolutions.
- Authentication in web embed
Authentication ensures that only users and systems with a verified identity use the web embed and that all permitted manipulations of the data occur as the current user identity.