# Affiliate Marketers/Ghost.org

**URL:** <https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473>\
**Category:** Integrations & API\
**Created:** [June 26, 2023, 11:02pm UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473 "2023-06-26T23:02:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stayaheadofai](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/stayaheadofai/32/25153_2.png) [@Stayaheadofai](https://forum.ghost.org/u/Stayaheadofai)\
**Post date:** [June 26, 2023, 11:02pm UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/1 "2023-06-26T23:02:50Z")

</div>

Good Afternoon Everyone,

I’m curious if anyone is doing Affiliate marketing with their [Ghost.org](http://Ghost.org) blog…

I want to find a similar tool that can integrate to Ghost, similar to Thirsty Affiliates for Wordpress.

If you are doing affiliate marketing and have a site on Ghost

I’d love to connect, please help.

---

<div class="post-metadata">

**Author:** ![Unicom](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/unicom/32/25878_2.png) [@Unicom](https://forum.ghost.org/u/Unicom)\
**Post date:** [August 16, 2023, 7:49pm UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/2 "2023-08-16T19:49:12Z")

</div>

I wouldn’t write off affiliate marketing either, even though it’s a perpendicular idea to paid memberships. However, in many markets and niches you cannot sell subscriptions, but affiliate marketing works very well there. For example, reviews of technology, various curated collections, and so on. I think the core team still has something to do and they will not seriously go in this direction. we don’t expect a system for managing affiliate links or anything like that exists in the wordpress ecosystem.

However, just as a thought experiment, imagine that you could create curated collections in Ghost. Whether to do it in the form of post cards or create special collections based on some kind of special tags, let’s discuss. At least the first step shouldn’t be difficult.

---

<div class="post-metadata">

**Author:** ![joseo](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@joseo](https://forum.ghost.org/u/joseo)\
**Post date:** [January 25, 2024, 5:47am UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/3 "2024-01-25T05:47:06Z")

</div>

Hi there @Stayaheadofai and @Unicom

I am planning to release an integration that will enable curated cards like Lasso, Genius or Thirsty Affiliates.

Wondering if you have feedback on what features you might find useful and if you’d be willing to use it.

Features:

1. Show the item prices at major retailers (Target, Amazon, Walmart etc.), so your reader can choose the best price

2. Show product availability so your reader knows they can get it

3. Direct international customers to the right Amazon store

4. Price and availability gets refreshed at least once every 24 hours, so it will be very accurate

5. Fix broken links automatically

See it in action on our test blog [Affordable Stocking Stuffers: Fidget toys that buy parents time (and sanity) (oh-mother.ghost.io)](https://oh-mother.ghost.io/stocking-stuffer-alert-load-up-on-these-three-fidget-toys/) (on Ghost, of course 😉)

Here’s a screen shot of a card.

 ![where-to-buy screenshot](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/5/0/507512454bbb8630d91f8d308ab29fed6a0b98b2.png)

Let me know what you think!

---

<div class="post-metadata">

**Author:** ![Bret](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/bret/32/28958_2.png) [@Bret](https://forum.ghost.org/u/Bret)\
**Post date:** [February 13, 2024, 9:09am UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/4 "2024-02-13T09:09:19Z")

</div>

This would be useful for me at least, do let me know when it’s available, and thanks for the work put into it!

---

<div class="post-metadata">

**Author:** ![joseo](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@joseo](https://forum.ghost.org/u/joseo)\
**Post date:** [February 14, 2024, 4:40am UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/5 "2024-02-14T04:40:15Z")

</div>

Hey @Bret,

Thanks for the feedback! 🙏 It’s heartening to know we may be meeting an actual need .

Here’s a link to the early access list: [[Clics.so Early Access](https://tally.so/r/nGdzQp)]([https://Early](https://Early) Access to Clics). When it’s ready we will give you a code for a free trial.

If you have any feature requests, give us a shout and let us know.

- Jo

---

<div class="post-metadata">

**Author:** ![chillbilldill.com](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/chillbilldill.com/32/22849_2.png) [@chillbilldill.com](https://forum.ghost.org/u/chillbilldill.com)\
**Post date:** [February 15, 2024, 2:22am UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/6 "2024-02-15T02:22:24Z")

</div>

I do plenty of affiliate marketing on my Ghost based site, but I never really needed to use any plugins/extensions. I manage all of my affiliate partnerships within Google Sheets, then I use the snippet feature in Ghost to create sponsored link html snippets for reuse as needed.

---

<div class="post-metadata">

**Author:** ![block](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@block](https://forum.ghost.org/u/block)\
**Post date:** [February 15, 2024, 9:05am UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/7 "2024-02-15T09:05:01Z")

</div>

In my affiliate marketing links on Ghost, I only use nofollow vanity links with 301 redirects, leveraging the redirects.yaml file in the labs section.

This approach allows for easier troubleshooting and maintenance. Additionally, I opt for the HTML widget over snippet features or product widgets, as it enables the inclusion of nofollow links.

---

<div class="post-metadata">

**Author:** ![SuperCat74](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@SuperCat74](https://forum.ghost.org/u/SuperCat74)\
**Post date:** [February 15, 2024, 3:24pm UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/8 "2024-02-15T15:24:22Z")

</div>

> [@block](#):
>
> In my affiliate marketing links on Ghost, I only use nofollow vanity links with 301 redirects, leveraging the redirects.yaml file in the labs section.

Can you please provide an example of how to do this?

---

<div class="post-metadata">

**Author:** ![block](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@block](https://forum.ghost.org/u/block)\
**Post date:** [February 15, 2024, 5:25pm UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/9 "2024-02-15T17:25:47Z")

</div>

First

Labs \> Redirects.yaml \> Edit

```auto
301:
  /go/brand: https://www.brand.com/referrallink

```

Then

Post \> Edit \> Add HTML widget

```auto
<a rel="nofollow" href="https://www.yourwebsite.com/go/brand">This is a nofollow affiliate link</a>

```

---

<div class="post-metadata">

**Author:** ![joseo](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@joseo](https://forum.ghost.org/u/joseo)\
**Post date:** [February 20, 2024, 6:40am UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/10 "2024-02-20T06:40:31Z")

</div>

Hi there @chillbilldill.com ! Thanks for your feedback!

Jo

---

<div class="post-metadata">

**Author:** ![eduard](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/eduard/32/26172_2.png) [@eduard](https://forum.ghost.org/u/eduard)\
**Post date:** [March 14, 2024, 1:11pm UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/11 "2024-03-14T13:11:30Z")

</div>

I’d also add a code inject that adds nofollow to all /go/ links, something like this:

```auto
<script>
document.addEventListener('DOMContentLoaded', function() {
    // Select all anchor tags
    const links = document.querySelectorAll('a[href*="/go/"]');
    
    // Loop through each link and add 'rel=nofollow' if it doesn't already exist
    links.forEach(function(link) {
        if (!link.hasAttribute('rel')) {
            link.setAttribute('rel', 'nofollow');
        } else {
            // If the link already has a 'rel' attribute, add 'nofollow' to it without overwriting existing values
            const existingRelValue = link.getAttribute('rel');
            if (!existingRelValue.includes('nofollow')) {
                link.setAttribute('rel', existingRelValue + ' nofollow');
            }
        }
    });
});
</script>

```

---

<div class="post-metadata">

**Author:** ![block](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@block](https://forum.ghost.org/u/block)\
**Post date:** [March 14, 2024, 8:25pm UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/12 "2024-03-14T20:25:18Z")

</div>

Thank you, this is very nice and could help people to add their affiliate links in the Ghost buttons or in the product widget on Ghost. I will save this for future review!

---

<div class="post-metadata">

**Author:** ![eduard](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/eduard/32/26172_2.png) [@eduard](https://forum.ghost.org/u/eduard)\
**Post date:** [March 14, 2024, 8:42pm UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/13 "2024-03-14T20:42:41Z")

</div>

You’re welcome!  
Proudly done with the help of GPT-4 on the go 🙂  
I just checked it on my website, this snippet actually works.

---

<div class="post-metadata">

**Author:** ![SuperCat74](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@SuperCat74](https://forum.ghost.org/u/SuperCat74)\
**Post date:** [March 15, 2024, 9:04am UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/14 "2024-03-15T09:04:41Z")

</div>

Thank you. Could you please show an example of how one would use this affiliate script in your affiliate link?

---

<div class="post-metadata">

**Author:** ![eduard](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/eduard/32/26172_2.png) [@eduard](https://forum.ghost.org/u/eduard)\
**Post date:** [March 15, 2024, 12:26pm UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/15 "2024-03-15T12:26:54Z")

</div>

Let’s start with the basics:

When you have a referral link, it looks something like: [https://somefancy.brand/product-page?ref=somereflink123456789&some\_other=stuff](https://somefancy.brand/product-page?ref=somereflink123456789&some_other=stuff)

This is a not very nice link and it has 3 problems:

1. If you need to update a link for some reason, you’ll need to check all pages on the website and fix them manually.
2. everyone sees that it’s an affiliate link. Affiliate link cloaking works in such a way, when you have an internal link like yourbestweb.site/go/fancy-brand which redirects to the mentioned above somefancy.brand page.

Problems 1 and 2 are resolved via `redirects.yml` file. You can store as many affiliate links as you want. Please refer to the [Ghost CMS documentation](https://ghost.org/tutorials/implementing-redirects/).

1. Finally, there’s a `rel=nofollow` topic. It’s recommended to add nofollow rel attribute into referral links for better SEO practices. There’s a ton of information about it, here’s some random [article from Semrush explaining the details](https://www.semrush.com/blog/nofollow-links/).

So the script I showcased solves only the problem #3.

In the editor you can add convenient affiliate links like this: `/go/fancy-brand` instead of the full URL. Since we begin the link with the / character, it will always resolve to your website.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/4/0/402f1722cdfa07313891287c977b204572fe8487.png)  
I’ve also added a link to Google for demonstration.

Next, add a footer code inject to your article. Go to Post Settings → Code Inject

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

Once you preview your post in the new window, you’ll see this. All links with the the `/go/` part will have nofollow rel attribute

 ![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/4/7/47fd809540a84c6b33cf8d74f731643e60b98f0a.png)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![eduard](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/eduard/32/26172_2.png) [@eduard](https://forum.ghost.org/u/eduard)\
**Post date:** [March 15, 2024, 1:00pm UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/16 "2024-03-15T13:00:43Z")

</div>

Finally, once the JS script logic is understood you may want to minify the code.

The original script is about 750 characters. If you minify it using some [free online tools like this one](https://www.toptal.com/developers/javascript-minifier), you can get a more compact version of the script which is undes 300 characters:

```auto
document.addEventListener("DOMContentLoaded",function(){let e=document.querySelectorAll('a[href*="/go/"]');e.forEach(function(e){if(e.hasAttribute("rel")){let t=e.getAttribute("rel");t.includes("nofollow")||e.setAttribute("rel",t+" nofollow")}else e.setAttribute("rel","nofollow")})});

```

This is particularly useful if you have several code injects on your page.

---

<div class="post-metadata">

**Author:** ![SuperCat74](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@SuperCat74](https://forum.ghost.org/u/SuperCat74)\
**Post date:** [March 15, 2024, 9:46pm UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/17 "2024-03-15T21:46:34Z")

</div>

Hi eduard

Thanks for the detailed explanation.

But in the information you provided, it is not showing how you used this affiliate referral link “[https://somefancy.brand/product-page?ref=somereflink123456789&some\_other=stuff](https://somefancy.brand/product-page?ref=somereflink123456789&some_other=stuff)” to show up as “/go/fancy-brand” in an article or post.

---

<div class="post-metadata">

**Author:** ![eduard](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/eduard/32/26172_2.png) [@eduard](https://forum.ghost.org/u/eduard)\
**Post date:** [March 15, 2024, 10:00pm UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/18 "2024-03-15T22:00:12Z")

</div>

> [@SuperCat74](#):
>
> it is not showing how you used this affiliate referral link “[https://somefancy.brand/product-page?ref=somereflink123456789&some\_other=stuff](https://somefancy.brand/product-page?ref=somereflink123456789&some_other=stuff)” to show up as “/go/fancy-brand” in an article or post.

It’s covered in the link to the [Ghost tutorial on redirects](https://ghost.org/tutorials/implementing-redirects):

 ![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/e/1/e137833d34cf8f44a60950fed21893dea1a7f690.png)

---

<div class="post-metadata">

**Author:** ![chr1s9r](https://avatars.discourse-cdn.com/v4/letter/c/34f0e0/32.png) [@chr1s9r](https://forum.ghost.org/u/chr1s9r)\
**Post date:** [June 17, 2024, 4:19pm UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/19 "2024-06-17T16:19:27Z")

</div>

This would be perfect! Any update yet? 😊

---

<div class="post-metadata">

**Author:** ![ureaul](https://avatars.discourse-cdn.com/v4/letter/u/848f3c/32.png) [@ureaul](https://forum.ghost.org/u/ureaul)\
**Post date:** [October 30, 2024, 1:04pm UTC](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473/20 "2024-10-30T13:04:08Z")

</div>

@joseo Are you still working on this?

We are currently displaying about 1000 affiliate products via [affiliate-toolkit.com](http://affiliate-toolkit.com) plugin for our WP site, but we are considering switching to ghost to simplify everything.

[Next page](https://forum.ghost.org/t/affiliate-marketers-ghost-org/39473.md?page=2)
