Is there an embeddable signup form?

I’d like to embed the signup form for a ghost site on other sites - e.g. other ghost or static webpages. I can design the form, that’s not a problem, but I don’t know where to submit the form. Is there an API-based workaround (with CORS)?

3 Likes

We really need this

Yes, please give us this feature.

You can embed portal JS forms on any domain
(edit data-ghost attribute value to include your ghost install location)

<script defer src="https://unpkg.com/@tryghost/portal@~0.15.0/umd/portal.min.js" data-ghost="https://yourghostdomain.com"></script>

Portal will then work the same as on your local Ghost site, and you can built HTML forms that post to Ghost in the same way you can in themes.

We plan to create more paths for this in future - but there aren’t many people experimenting with it yet, so it requires some willingness to do some tinkering/exploration

2 Likes

I would like to swap the embedded form of another service with my Ghost installation and am wondering if any of these options are possible (to avoid adding JavaScript interactions on my page):

  • hard-coding the form action so that it redirects to the portal and sends the magic link after arriving at Ghost
  • setting the email via the portal URL https://yourghostdomain.com/#/portal/signup?email=someone@example.com
  • setting a label via the portal URL, like https://yourghostdomain.com/#/portal/signup?label=alfa

This really does need a bit more attention and clarity for users to be able to embed signups in all their other outlets. Critical for building membership.

With Ghost 5.0, there have been a few changes to this. To make Portal run on a non-Ghost site, you need to include the script as follows.

<script defer src="https://unpkg.com/@tryghost/portal@latest/umd/portal.min.js" data-ghost="https://yourghostdomain.com" data-api="https://{youradmindomain}/ghost/api/content/" data-key="CONTENT_API_KEY"></script>

To get a Content API Key, generate one in the Custom Integration section in Admin, the docs for this are here: Content API JavaScript Client

(I ran into an issue with the earlier implementation, the above solution was provided to me by Ghost support so I thought I’d cross-post here)

3 Likes

Is there a way to create a link that would open the embedded popup just like it opens when you click on it?

@JustLuis
We use a direct to a cupon, but i think you can just add /suscribe to your homepage

https://www.whitepaper.com.mx/30day

and you can use a link to your portal page

https://www.whitepaper.com.mx/#/portal/subscribe

2 Likes