WordPress.org

Ready to get started?Download WordPress

Forums

Overriding default ClickBank affiliate hoplink target page (2 posts)

  1. Graham Stoney
    Member
    Posted 2 years ago #

    I have a blog where I sell an ebook that helps men build confidence via ClickBank. There's a heap of free content on the blog, and I'd like my affiliates to be able to generate hoplinks that land on the most relevant page or post to their customers. For example, if I do a promotion targeted at Speed Dating Companies, I'd like the hoplinks they create to land on my article about successful speed dating, since that's what is most relevant to their customers.

    ClickBank allows extra parameters to be passed so I can instruct my affiliates to add a parameter to their hoplink to override the default hoplink target page like this:
    http://AFFILIATE.VENDOR.hop.clickbank.net/?p=112
    This gets redirected to:
    http://confidentman.net/confident-man-ebook/?hop=AFFILIATE&p=112

    Unfortunately this confuses WordPress, which returns a 404. Ideally I'd like it to honor the p=... parameter and redirect to that post, instead of the default hoplink target in the URL: /confident-man-ebook

    I tried creating a regular expression with the Redirection plugin to match this, but couldn't quite get it to work. Anyone else know of a plugin to do this, or another way to vary affiliate hoplink targets?

    Thanks,
    Graham

  2. Graham Stoney
    Member
    Posted 2 years ago #

    After a little more testing, I've discovered that WordPress already does exactly what I want by default. The request above doesn't confuse WordPress at all. However a problem with the Smart404 plugin is causing a redirection loop.

    The workaround is to disable Smart404; but I'm hoping the author can help fix the problem.

    You can in fact retarget ClickBank affiliate hoplinks just by adding ?p=xxx to the hoplink.

    Cheers,
    Graham

Topic Closed

This topic has been closed to new replies.

About this Topic