How to install the signup form on Ghost

Ghost is an open source publishing platform which is easy to use, designed to simplify the process of online publishing for individual bloggers as well as online publications. It comes with built-in tools to build a website, publish content, send newsletters & offer paid subscriptions to members. 

Integrating Prefinery with your Ghost website allows you to run your own referral program, or a pre-launch waitlist campaign. 

Installing Prefinery


In your Prefinery project dashboard, navigate to Installation then click on the JavaScript Snippet code to copy it. 


In your Ghost website dashboard, navigate to Settings (cog icon) then scroll down to the Advanced section and click on Code Injection


In the Code Injection settings page, under Site Header paste in the Prefinery JavaScript Snippet you copied in step 1, then hit Save


Back in your Prefinery dashboard and still in the Installation page, under the Push Users into Prefinery section select Embedded Form then click on the form embed code to copy it. 


In your Ghost website dashboard, navigate to Pages then either create a new page or edit an existing one to where you want to place your Prefinery embedded form.


While editing your existing page or creating your new page, insert an HTML card in the content, paste in the Prefinery form embed code you copied in step 4, then Update/Publish your changes. 


View the new/updated page to make sure your Prefinery embedded form is all set. 

How to make sure referrals are getting tracked

To track referrals, Prefinery uses cookies to ensure that even if a person has followed a referrer's link, but has only signed up at a later time directly on the website and no longer through the referrer's link, the referral is still getting counted. 

Ghost uses the top-level domain for the staging subdomains (e.g. The Prefinery JavaScript Snippet meanwhile writes our cookies to the top-level domain The reason we do this is because we want to track referrals across subdomains, for example if a person lands on and eventually is passed to their e-commerce store at, then we need that subdomain to also have access to the cookie in order to record the referral. The same could be true if you want to pass visitors from to

We've found that Ghost doesn't allow the writing of cookies on its TLD which means if you tried to test referrals on your Ghost website's staging URL you may find it not working. The referred user is still able to signup through the referral link, but the referral isn't counted. 

To resolve this, you will need to first set up your own custom domain on your Ghost website, then you can test out referrals through the custom domain URL. They have a comprehensive guide here on how you can do that: Using custom domains with your Ghost(Pro) publication - Tutorial

Still need help? How can we help? How can we help?