# Is there an embeddable signup form?

**URL:** <https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428>\
**Category:** Memberships & subscriptions\
**Created:** [October 23, 2021, 12:11pm UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428 "2021-10-23T12:11:01Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![ScottMorris](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/scottmorris/32/22649_2.png) [@ScottMorris](https://forum.ghost.org/u/ScottMorris)\
**Post date:** [January 21, 2023, 11:15pm UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/21 "2023-01-21T23:15:53Z")

</div>

I see. There’s nothing on the network tab that’s even loading from my Ghost site

EDIT: Disregard, I found this

---

<div class="post-metadata">

**Author:** ![markstos](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/markstos/32/18182_2.png) [@markstos](https://forum.ghost.org/u/markstos)\
**Post date:** [January 21, 2023, 11:34pm UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/22 "2023-01-21T23:34:22Z")

</div>

Does it literally say GHOSTADMINDOMAIN or your actual domain name?

---

<div class="post-metadata">

**Author:** ![ScottMorris](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/scottmorris/32/22649_2.png) [@ScottMorris](https://forum.ghost.org/u/ScottMorris)\
**Post date:** [January 21, 2023, 11:39pm UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/23 "2023-01-21T23:39:44Z")

</div>

It says my \*.ghost.io domain, which I just didn’t want to post.

---

<div class="post-metadata">

**Author:** ![markstos](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/markstos/32/18182_2.png) [@markstos](https://forum.ghost.org/u/markstos)\
**Post date:** [January 21, 2023, 11:42pm UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/24 "2023-01-21T23:42:34Z")

</div>

302 is a temporary redirect. There should be a Location header in the HTTP 302 response of the URL it will try next.

---

<div class="post-metadata">

**Author:** ![ScottMorris](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/scottmorris/32/22649_2.png) [@ScottMorris](https://forum.ghost.org/u/ScottMorris)\
**Post date:** [January 22, 2023, 12:06am UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/25 "2023-01-22T00:06:44Z")

</div>

OK I found this. There’s no access-control-allow-origin here though. It seems like it’s redirecting from my admin domain to my regular domain. Could the discrepancy be why it’s throwing a CORS error?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/c/2/c27c5d2a9885cf888e64cd92971327b849279cf3.png)

EDIT: I figured this out. I needed to use my regular domain for data-ghost and my admin domain for data-api. This is what my script tag should have been:

> `<script defer src="https://unpkg.com/@tryghost/portal@latest/umd/portal.min.js" data-ghost="https://www.vallejosun.com" data-api="https://vallejo-sun.ghost.io/ghost/api/content/" data-key="699593c3a30c3a6f2376e2f14a"></script>`

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [January 22, 2023, 3:59am UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/26 "2023-01-22T03:59:35Z")

</div>

Glad you figured it out! :) Thanks for reporting back.

---

<div class="post-metadata">

**Author:** ![ScottMorris](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/scottmorris/32/22649_2.png) [@ScottMorris](https://forum.ghost.org/u/ScottMorris)\
**Post date:** [January 23, 2023, 1:52am UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/27 "2023-01-23T01:52:25Z")

</div>

Adding this to the external site is now adding the “subscribe” button from the bottom right corner of my Ghost site to the other site.

---

<div class="post-metadata">

**Author:** ![rosano](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/rosano/32/15790_2.png) [@rosano](https://forum.ghost.org/u/rosano)\
**Post date:** [July 2, 2023, 1:16pm UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/29 "2023-07-02T13:16:47Z")

</div>

Now there is a built-in solution:

> [@Embeddable signup forms - Ghost Changelog](https://forum.ghost.org/t/embeddable-signup-forms-ghost-changelog/39177/5):
>
> Works great here: (That’s my Ghost Pro-hosted test site.) Folks who are having problems, I’ll guess that you have a proxy of some sort in front of your site or are doing some URL rewriting. That screen needs to make a call to your API (on your backend URL) and load a piece of javascript. If you open developer tools (F12) and look at your console log, you might find a hint about the problem.

---

<div class="post-metadata">

**Author:** ![sigurica](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@sigurica](https://forum.ghost.org/u/sigurica)\
**Post date:** [October 3, 2024, 5:55pm UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/30 "2024-10-03T17:55:42Z")

</div>

Hi all!

Does anybody get the following error in the console when trying to subscribe to an email?

```auto
api.tsx:18 
GET http://localhost:8000/members/api/integrity-token/ 404 (Not Found)

```

It doesn’t work on localhost, but it doesn’t work in production either…

I have a blog setup on [www.mydomain.com/blog](http://www.mydomain.com/blog). I am trying to add the embeddable form to the homepage ([www.mydomain.com](http://www.mydomain.com)). When I try to submit the form, the validation message says “Something went wrong, please try again.”

Here’s how my script and form look:

```auto
<script defer src="https://cdn.jsdelivr.net/ghost/signup-form@~0.1/umd/signup-form.min.js" data-ghost="https://mydomain.com" data-api="https://mydomain.com/blog/ghost/api/content/" data-key="19305e56ac2c1589024ad0305a" data-button-color="#d08933" data-button-text-color="#FFFFFF"></script>

```

I tried this too: `data-ghost="https://mydomain.com"`

I’ve read across the forum and couldn’t find this error message anywhere. My version of Ghost CMS is 5.76.2.

Any help is more than appreciated!

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [October 3, 2024, 6:46pm UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/31 "2024-10-03T18:46:35Z")

</div>

You’re on a pretty old version of ghost and may want to update.

To get a more diagnostic error message, please open the browser console (F12) and look for any error messages on the console or network responses shown in red (look at what’s in the response if you find one)

---

<div class="post-metadata">

**Author:** ![sigurica](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@sigurica](https://forum.ghost.org/u/sigurica)\
**Post date:** [October 4, 2024, 11:20am UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/32 "2024-10-04T11:20:26Z")

</div>

Thanks for the advice!

Here is the response of the error:

```auto
{
    "errors": [
        {
            "message": "Resource not found",
            "context": null,
            "type": "NotFoundError",
            "details": null,
            "property": null,
            "help": null,
            "code": null,
            "id": "48b79d20-8242-11ef-acc2-7f98b1a6b9d0",
            "ghostErrorCode": null
        }
    ]
}

```

You think that updating Ghost to a newer version would help? Is my current version really that old? I’m on the latest major version (5).

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [October 4, 2024, 11:28am UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/33 "2024-10-04T11:28:53Z")

</div>

It’s not horribly old, no. But the ghost team bumps the minor version weekly, and it’s 5.96 today. It’s possible that upgrading will fix the problem.

What network call is that response to? And can you share the code that you’re using to embed the signup card?

---

<div class="post-metadata">

**Author:** ![sigurica](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@sigurica](https://forum.ghost.org/u/sigurica)\
**Post date:** [October 4, 2024, 11:39am UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/34 "2024-10-04T11:39:38Z")

</div>

I already shared the code that I use to embed the signup form, but here is it again. Now it’s somewhat different:

````auto
<script src="https://cdn.jsdelivr.net/ghost/signup-form@~0.1/umd/signup-form.min.js" data-button-color="#d08933" data-button-text-color="#FFFFFF" data-site="https://MYDOMAIN.com/blog" async></script>```

This was my initial version of the code. Then I tried using some advice from this thread (which was the previous version of the code I pasted earlier).

The response I pasted is the response for https://MYDOMAIN.com/blog/members/api/integrity-token/.

I noticed that when I change https://MYDOMAIN.com/blog to https://MYDOMAIN.com/ I get a CORS error like many other people in this thread. However, I didn't try pushing this change, so this CORS error appears only on localhost (so far).
````

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [October 4, 2024, 12:41pm UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/35 "2024-10-04T12:41:52Z")

</div>

> [@sigurica](#):
>
> but here is it again.

Sorry! I should have scrolled up!

I think you’re maybe looking at a bug related to having Ghost in a subdirectory.

---

<div class="post-metadata">

**Author:** ![sigurica](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@sigurica](https://forum.ghost.org/u/sigurica)\
**Post date:** [October 4, 2024, 1:36pm UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/36 "2024-10-04T13:36:18Z")

</div>

Thank you! I’m gonna search the forum for topics that describe such bug. So basically, I should migrate the blog to a subdomain?

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [October 4, 2024, 1:38pm UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/37 "2024-10-04T13:38:09Z")

</div>

That’s a big step (will break all links) if your blog is in production. Before you do any of that, I’d encourage you to update to the lastest version of Ghost, because it might just make the problem go away. :) And if it doesn’t a bug report would be appropriate.

---

<div class="post-metadata">

**Author:** ![sigurica](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@sigurica](https://forum.ghost.org/u/sigurica)\
**Post date:** [October 4, 2024, 1:41pm UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/38 "2024-10-04T13:41:06Z")

</div>

Alright, will do. Thanks a lot!

---

<div class="post-metadata">

**Author:** ![sigurica](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@sigurica](https://forum.ghost.org/u/sigurica)\
**Post date:** [October 6, 2024, 3:46pm UTC](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428/39 "2024-10-06T15:46:05Z")

</div>

Update for anyone with a similar problem. Updating Ghost CMS to the latest version did the trick. Luckily, I didn’t have to migrate the blog to a subdomain. Thanks everyone for the help!

[Previous page](https://forum.ghost.org/t/is-there-an-embeddable-signup-form/26428.md?page=1)
