# Links and sub-IDs

> How to create tracking links, deep links to specific products, sub-IDs and HTML that shows the exact page every click came from.

An Affilyflow link sends the customer on to the store and records the click. If a purchase follows within the program's cookie duration, you earn the commission. The rate and the cookie window are locked the moment someone clicks – a store that lowers its rate later does not affect earlier clicks.

The affiliate dashboard is in Danish; buttons are given as they appear on screen, with an English translation.

## What a link looks like

```text title="Your link"
https://app.affilyflow.com/go/3f9a1c07be
```

The last part is the link's code. The address never changes – not even when you edit or archive the link.

## Create a link

Press **Opret link** (Create link) on Oversigt (Overview), under **Links → Dine links** (Your links) or under **Værktøjer** (Tools). You can also create a link from a program page or straight from a product under **Programmer → Produkter** (Programs → Products). You can only create links to programs you have joined.

| Field | What it does |
|---|---|
| Program | The store the link goes to. |
| Hvor skal kunden lande? (Where should the customer land?) | The home page or a specific page at the store (deep link). |
| Sub-ID | Your own label to tell placements apart, e.g. two posts or videos. At most 80 characters. |
| Kampagne (Campaign) | Becomes the link's name and is passed to the store as `utm_campaign`. |
| Kanal (Channel) | E.g. SEO, Blog, Instagram, TikTok, YouTube, Facebook, Pinterest, E-mail or Website. Only the program's allowed channels can be chosen. Passed to the store as `utm_medium`. |
| Site | Optional label. Passed to the store as `utm_source`. Not needed – clicks from your sites are measured automatically. |
| Placering (Placement) | The page where you put the link. Only used when the browser does not send the page itself. |

If a link with exactly the same settings already exists, you get the existing link instead of a copy. If you change the landing page, sub-ID, campaign or channel, it becomes a new link.

## Deep links to a specific page

Under **Hvor skal kunden lande?** you can enter:

- a path, e.g. `/products/sofa`
- a path with the store's own parameters, e.g. `/products/sofa?variant=42`
- the full address at the store, e.g. `https://store.com/products/sofa`

The landing page must be on the store's own domain – otherwise the sale cannot be tracked, and the link is not created.

You can also send an existing link to another page without creating a new link. Add `?p=` with the path:

```text title="The same link to another page"
https://app.affilyflow.com/go/3f9a1c07be?p=/products/sofa
```

A path on another domain is ignored, and the customer lands on the link's own landing page.

## Sub-IDs

A sub-ID tells placements and campaigns apart in your numbers – for example an article versus a newsletter, or two TikTok videos. You can give a link a fixed sub-ID when you create it, or add one to an existing link with `?sid=`:

```text title="A sub-ID per placement"
https://app.affilyflow.com/go/3f9a1c07be?sid=tiktok-sofa-video-oct
```

`?sid=` on the link wins over the link's own sub-ID. The sub-ID is stored on every click, and you see it under **Resultater** (Results – the Overblik, Klik & salg and Salg tabs), in the sale detail and in the CSV export.

> [!TIP]
> Use a fixed naming scheme so the numbers are easy to read: `<channel>-<page-or-campaign>-<month>`, lower case with hyphens, e.g. `blog-best-sofas-oct`.

## Parameters you can add to the link yourself

| Parameter | Example | Effect |
|---|---|---|
| `sid` | `?sid=blog-sofas-oct` | Sub-ID for this particular click (at most 80 characters). |
| `p` | `?p=/products/sofa` | Landing page at the store. |
| `utm_*` | `?utm_content=button-top` | Passed on to the store so it can see it in its own analytics. |

Parameters can be combined: `?sid=newsletter-oct&p=/sale`. The `placement` parameter is set by the [placement.js](https://www.affilyflow.com/en/docs/affiliate/page-tracking) script – you should not write it yourself.

## Copy link or Copy HTML

Every link has two buttons.

**Kopier link** (Copy link) gives you the address. Use it on social media, in video descriptions, in emails and anywhere else you can only paste an address.

**Kopier HTML** (Copy HTML) gives you ready-made link code for your site. You can edit the link text before you copy.

```html title="Copy HTML"
<a href="https://app.affilyflow.com/go/3f9a1c07be" rel="sponsored noopener" target="_blank" referrerpolicy="no-referrer-when-downgrade">See the offer at Store</a>
```

| Attribute | Why |
|---|---|
| `referrerpolicy="no-referrer-when-downgrade"` | Asks the browser to send the full address of the page. The click then automatically gets the exact page the link was on – no script and no sub-ID needed. |
| `rel="sponsored"` | Tells search engines the link is a paid link. |
| `rel="noopener"` and `target="_blank"` | Opens the store in a new tab without the store's page being able to control yours. |

The store's banners (on the program page once you have joined) have the same attributes.

> [!NOTE]
> If you have already added plain links to your site, you get the exact page by replacing them with the HTML – or by adding the script once. See [Page tracking](https://www.affilyflow.com/en/docs/affiliate/page-tracking).

## QR code

Open a link under **Dine links** to see and download its QR code – for print, posters or a video, for example.

## Edit a link

Under **Dine links** you can change a link's name, landing page and site label. The address never changes.

Sub-ID, campaign and channel cannot be changed on an existing link, because the clicks have already been recorded with them. Create a new link, or add `?sid=` to the existing one.

## Archive a link

Press **Arkiver** (Archive) to hide a link from the list. An archived link keeps working: it sends the customer on and records clicks and sales. Press **Hent frem** (Restore) to show it again.

## Limits

- Links can only be created for programs you have joined and that are active.
- Through the [API](https://www.affilyflow.com/en/docs/affiliate/rest-api) and the [MCP server](https://www.affilyflow.com/en/docs/affiliate/mcp) you can create at most 500 new links per 24 hours. A reused identical link does not count.

> [!WARNING]
> A discount code shared with all affiliates earns no commission on its own – it is the click on your link that credits you. Always share the code together with the link. Only a personal discount code the store has given you earns commission without a click – see [Program rules](https://www.affilyflow.com/en/docs/affiliate/rules#discount-codes).

Source: https://www.affilyflow.com/en/docs/affiliate/links-and-sub-ids
