The publisher tag

If you write about brands on a site of your own (a blog, a review site, a newsletter archive), the tag saves you pasting tracked links by hand. Add it once and every link on your pages that points at a store you have joined becomes your tracked link. It is for creators and affiliates; a brand's own store uses the tracking code on Connect store instead.

A network or a publisher platform with many sites rewrites its links itself through the partner API.

What it does

The tag is one small script. When a page loads it reads the links already on that page and rewrites the ones that point at a store you are approved at, so a click goes through your tracked link and the order is credited to you. The link keeps its text, gains rel="sponsored", and sends the reader to the same page it always did.

Nothing else changes. Links to anything else are left exactly as you wrote them, and a link that is already a tracked link is left alone, so a page you wrote by hand and a page the tag handles can sit side by side.

Where to paste it

Your tag is on Links, under “More ways to use your links” as “Links on your own website”. Press “Get the tag”, copy it, and paste it once into the HTML of your site, just before </head>. Most site builders have a field for this, usually called custom code, code injection or header scripts.

<script src="https://partnely.app/pub.js?k=YOUR-KEY" async></script>

One tag covers your whole site and every program you are in. Join another program and it is covered the next time one of your pages loads: there is nothing to paste again. “Make a new tag” replaces the key, which stops the old tag at once. Use it if the key ends up somewhere it should not be, and paste the new one on your site afterwards.

  • A link to the website or shop address of a store you are approved at, and any page under them: a product, a collection, a sale.
  • Links you wrote before you added the tag, since the tag reads the page rather than your writing.
  • Links a page adds afterwards, so a list that loads as you scroll is covered as it arrives.

A program that has not approved you yet, a program you left, and a store whose program is paused are not rewritten: those links stay as they are and take the reader to the store as before. Links to your own site, and tracked links you pasted yourself, are never touched.

Three kinds of link to a brand you have joined are left alone too, because a tracked link could not open the same page:

  • A discount or checkout address, /discount/YOURCODE on a Shopify store, say. The code in it already credits you when the shopper buys, so the link is better as you wrote it.
  • An old link that begins http:// rather than https://, on a store whose own site is https. Write it with https:// and it is rewritten like any other.
  • An address with a port or a name and password in it, which is not a page a shopper is sent to.

Naming a placement

Each rewritten link carries a sub-ID, which is your own name for where you posted it. Clicks and orders are listed under it on Links, and the brand sees the same label in its reports. It never changes who is credited.

Without a label the page's own path is used, so the review you wrote is already told apart from your home page. To name one yourself, put data-pn-sid on the link, or on anything around it (a section, or the whole page):

<a href="https://store.example/products/serum" data-pn-sid="serum-review">the serum</a>

<div data-pn-sid="round-up">
  <a href="https://store.example/products/a">A</a>
  <a href="https://store.example/products/b">B</a>
</div>

A label is a short word or two, at most 64 characters.

Leaving a link alone

Put data-pn-off on a link, or on anything around it, and the tag leaves that link exactly as you wrote it:

<a href="https://store.example/pages/about" data-pn-off>about the brand</a>

Use it for a link that should not earn: a note about a brand, a page you are quoting, or a link you have already tracked your own way.

A collection on your site

A collection from My page can stand on your own site too, every product on your own link. Open the collection's card, then “Put it on your website”, press “Get the code” and copy it. Every collection is also listed on Links, under “More ways to use your links”.

<script src="https://partnely.app/collection.js?k=YOUR-KEY&c=COLLECTION" async></script>

Paste it where the collection should stand, and it draws right there, in your page's colours and corners and your site's own font. To draw it somewhere else on the page, put an empty element there that names it, and the code can sit anywhere:

<div data-pn-collection="COLLECTION"></div>
  • Pasted in your page's head, the code draws only into that element, since nothing in the head shows on the page.
  • Each click carries a label, your site's own name, so it is told apart from your page. To name it yourself, put data-pn-sid on the code or on that element.
  • The code is read again at most every five minutes, so a change you save on My page shows on your site within five minutes.
  • A hidden collection draws nothing, and a product the brand takes off sale drops out of it, as on your page.
  • It uses the same key as the tag, so “Make a new tag” stops every collection code too: paste the new codes afterwards.

Your product list at an address

A site that builds its own product pages can read a brand's whole catalog with your link on every row. On Links, under “More ways to use your links”, press “Get feed addresses” and copy the address beside the brand. Each brand has its own:

https://partnely.app/feeds/feed_YOUR-KEY/the-brand.csv

It answers the same file as “Download feed”, a CSV with the columns id, title, price, currency, category, image, product_url and tracked_url. A price is in the brand's own currency, or empty, and tracked_url opens that product's page through your link.

  • It is read fresh on every request, so a product the brand adds or takes off sale is there or gone the next time your site reads it.
  • Anyone with the address can read the list, so give it only to your own site. “Make new addresses” stops every old address at once.
  • It stops answering while you are not approved at that brand, and answers again once you are.

What it never does

  • It sets no cookie and stores nothing in the browser, and neither does a collection's code.
  • It reads nothing about your readers and sends nothing anywhere: the only request is the script itself, and for a collection the pictures in it.
  • It changes nothing on the page but the addresses of those links, and it runs nothing on the store's side.

A click is counted where it always was: when somebody follows the link and arrives at the store. That is the same tracked link you would have pasted by hand, so your figures, your sub-IDs and the brand's reports all read as they do for every other link.

Checking it works

  • Open one of your pages and hover a link to a brand you have joined: the address at the bottom of the browser is your tracked link.
  • Follow it. You should land on the page the link named, with the store's own address in the bar.
  • Your clicks show up on Links within a minute or two, under the sub-ID for that page.
  • Links says Seen on your site once a page with the tag loads.
  • If nothing changed, check the tag is on the page (view source and look for /pub.js), that you are approved at that brand, and that you copied the current tag rather than one you replaced.

Partnely adds the tag's own name to the page, so a developer can re-run it after changing links with Partnely.publisher.refresh().