# HTML pop-ups to collect Ghost signups from other websites

**URL:** <https://forum.ghost.org/t/html-pop-ups-to-collect-ghost-signups-from-other-websites/33780>\
**Category:** Marketing & promotion\
**Created:** [October 30, 2022, 4:22pm UTC](https://forum.ghost.org/t/html-pop-ups-to-collect-ghost-signups-from-other-websites/33780 "2022-10-30T16:22:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![PORK-PIE](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/pork-pie/32/19941_2.png) [@PORK-PIE](https://forum.ghost.org/u/PORK-PIE)\
**Post date:** [October 30, 2022, 4:22pm UTC](https://forum.ghost.org/t/html-pop-ups-to-collect-ghost-signups-from-other-websites/33780/1 "2022-10-30T16:22:06Z")

</div>

I have another website where I’d like to collect subscribers for my Ghost newsletter. Is there a simple HTML pop-up or even an iframe I can implement? Right now I can only add a link to #/portal/signup but it’s not very efficient.

---

<div class="post-metadata">

**Author:** ![Stromfeldt](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/stromfeldt/32/13572_2.png) [@Stromfeldt](https://forum.ghost.org/u/Stromfeldt)\
**Post date:** [October 30, 2022, 5:31pm UTC](https://forum.ghost.org/t/html-pop-ups-to-collect-ghost-signups-from-other-websites/33780/2 "2022-10-30T17:31:44Z")

</div>

Yup, see this thread for more:

> [@Is there an embeddable signup form?](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428):
>
> 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)?

---

<div class="post-metadata">

**Author:** ![PORK-PIE](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/pork-pie/32/19941_2.png) [@PORK-PIE](https://forum.ghost.org/u/PORK-PIE)\
**Post date:** [October 30, 2022, 6:35pm UTC](https://forum.ghost.org/t/html-pop-ups-to-collect-ghost-signups-from-other-websites/33780/3 "2022-10-30T18:35:03Z")

</div>

Thanks! This looks like what I need, but I’m unable to get it to work. I’ll keep trying.

---

<div class="post-metadata">

**Author:** ![RyanF](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ryanf/32/17448_2.png) [@RyanF](https://forum.ghost.org/u/RyanF)\
**Post date:** [October 31, 2022, 2:11pm UTC](https://forum.ghost.org/t/html-pop-ups-to-collect-ghost-signups-from-other-websites/33780/4 "2022-10-31T14:11:24Z")

</div>

The instructions may have changed a bit since that thread.

Here’s the script tag you need to include:

```plaintext
<script defer src="https://cdn.jsdelivr.net/ghost/portal@~2.15/umd/portal.min.js" data-api="https://yoursite.com/ghost/api/content/" data-key="YOUR_CONTENT_API_KEY" data-ghost="https://yourghostsite.com/"></script>

```

You’ll need to generate a custom integration at **Settings** → **Integrations**.

> **[Official Ghost + Custom Integrations Integration](https://ghost.org/integrations/custom-integrations/)**
>
> How to create custom API and webhook based integrations for the Ghost publishing platform, full developer documentation and guide.

Let me know how it goes!

---

<div class="post-metadata">

**Author:** ![PORK-PIE](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/pork-pie/32/19941_2.png) [@PORK-PIE](https://forum.ghost.org/u/PORK-PIE)\
**Post date:** [October 31, 2022, 6:33pm UTC](https://forum.ghost.org/t/html-pop-ups-to-collect-ghost-signups-from-other-websites/33780/5 "2022-10-31T18:33:07Z")

</div>

Thanks Ryan I’ll try this out.  
This uses the “Content API key” is that correct?

---

<div class="post-metadata">

**Author:** ![RyanF](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ryanf/32/17448_2.png) [@RyanF](https://forum.ghost.org/u/RyanF)\
**Post date:** [October 31, 2022, 6:53pm UTC](https://forum.ghost.org/t/html-pop-ups-to-collect-ghost-signups-from-other-websites/33780/6 "2022-10-31T18:53:14Z")

</div>

Yes! You’d never want to expose your Admin API key publicly like on a script tag in this case.

---

<div class="post-metadata">

**Author:** ![PORK-PIE](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/pork-pie/32/19941_2.png) [@PORK-PIE](https://forum.ghost.org/u/PORK-PIE)\
**Post date:** [October 31, 2022, 8:40pm UTC](https://forum.ghost.org/t/html-pop-ups-to-collect-ghost-signups-from-other-websites/33780/7 "2022-10-31T20:40:56Z")

</div>

Thanks Ryan. I’ve tried a few different ways and can’t get this to work. Literally nothing shows up when I refresh the page. I’m trying to add it to my Shopify site, and one problem I run into when pasting this as HTML into an existing page is that Shopify turns this:

```auto
<script defer src="...

```

…into this:

```auto
<script defer="defer" src="...

```

I tried adding it to a custom **page.liquid** and **theme.liquid** templates, but no luck there either.

 ![Screenshot 2022-10-31 at 1.43.08 PM](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/d/4/d460364c944bd5eec5f46d2d7e0a5756d8d94c35.png)

---

<div class="post-metadata">

**Author:** ![RyanF](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ryanf/32/17448_2.png) [@RyanF](https://forum.ghost.org/u/RyanF)\
**Post date:** [October 31, 2022, 8:59pm UTC](https://forum.ghost.org/t/html-pop-ups-to-collect-ghost-signups-from-other-websites/33780/8 "2022-10-31T20:59:42Z")

</div>

Can you share a link to your Shopify page? Do you see any errors in the console?

For defer, you should be able to do `defer="true"`.

---

<div class="post-metadata">

**Author:** ![PORK-PIE](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/pork-pie/32/19941_2.png) [@PORK-PIE](https://forum.ghost.org/u/PORK-PIE)\
**Post date:** [October 31, 2022, 9:33pm UTC](https://forum.ghost.org/t/html-pop-ups-to-collect-ghost-signups-from-other-websites/33780/9 "2022-10-31T21:33:19Z")

</div>

Sure thing, thanks for taking a look. It’s [https://porkpiebrand.com/pages/newsletter-signup](https://porkpiebrand.com/pages/newsletter-signup)

EDIT: Checked the console and saw this:

> ![Screenshot 2022-10-31 at 3.21.49 PM](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/a/f/afb41956ebc6f1beab7b7db6029c282f173da324.png)

Looked it up on a [Shopify forum](https://community.shopify.com/c/shopify-apis-and-sdks/using-apis-from-a-different-origin-domain/td-p/502781) and found this answer (although I don’t know how to implement this):

> ![Screenshot 2022-10-31 at 3.22.14 PM](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/4/6/46d5628f0380d21aa891d18b582c684517767748.png)
