Embedding an artifact in an existing website
Updated:
Published pages can be embedded in someone else's website. sharepa sets no header that forbids it, so an iframe works. Two things you need to know: pages with a password are not suitable for this, and you have to set the height yourself.
This is useful when you want to put a tool from the chat into an existing page, a calculator in a blog post for instance, without touching your whole layout.
How it works
- Publish the artifact and note the address.

- Put this block where the page should appear on your website:
<iframe src="https://kochkurs.sharepa.page/"
title="Kochkurs-Rechner"
width="100%" height="700"
style="border:0" loading="lazy"></iframe>
- Check the result on a phone. An
iframedoes not grow with its content, you set the height. Find a height where nothing is cut off on a narrow screen either.
The title belongs there, otherwise people using a screen reader cannot find their way.
What it costs
Nothing extra. The usual limits apply: three pages free, the note “Made with sharepa” bottom right. The note also appears inside the embedded frame, because it is part of the page.
Questions
Are embedded hits counted?
Yes. For us that is a normal hit on the page. Your website then shows up under referrers, so you see how often the frame was loaded.
Does this work with a password-protected page?
In practice no. The cookie that remembers the unlock is set to SameSite=Lax. Browsers do not send it inside someone else's frame. Visitors would have to enter the password on every hit, and even that often fails. Use a page without a password for embedded content, or link to it instead of embedding it.
Can the height adjust automatically?
Not on its own. sharepa sends no message about the height to the surrounding page. If you need that, you build something into your artifact that reports the height, and read it on your own website.
Can I forbid embedding?
Not today. There is no switch for it. If it bothers you that strangers could put your page into theirs, that is a reason to write to us. A switch would be possible, nobody has needed it so far.
Does a React artifact work too?
Yes, for the frame it makes no difference. How React artifacts are built is described in the guide about it.