> For the complete documentation index, see [llms.txt](https://ctracker-docs.keywordrush.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ctracker-docs.keywordrush.com/shortcodes/tracking-links-shortcode.md).

# Tracking links

For tracking to work correctly, follow these requirements:

* The user must be registered and logged in to the site.
* The user must click a special link containing a SubID. You can create such links with the shortcodes below. SubID support is also available in Content Egg and Affiliate Egg plugins, and in some themes such as Rehub.

The plugin provides several shortcodes for creating tracking links.

{% hint style="info" %}
If a user is not logged in and clicks such a link, it works as a plain affiliate link without tracking or cashback.
{% endhint %}

### Tracking link for domain

The following shortcode creates a tracking link for the AliExpress merchant:

```php
[tracking-link advertiser="aliexpress.com" anchor="Click here for cashback!" /]
```

{% hint style="warning" %}
You must be approved by the merchant in your affiliate network. If you were recently approved, refresh the advertiser list in the module's settings.
{% endhint %}

### Tracking link for Advertiser ID

The safer, recommended approach is to use the Advertiser ID instead of a domain and also specify the module name:

```php
[tracking-link advertiser=6115 module=Admitad anchor="Go to Aliexpress" /]
```

{% hint style="success" %}
How to get the Advertiser ID is explained in the [Affiliate networks settings](/affiliate-networks-settings/admitad.md).
{% endhint %}

### Tracking link for product URL

You can also create a link pointing directly to a product page instead of the merchant's homepage:

```php
[tracking-link advertiser=6115 module=Admitad product="https://aliexpress.com/item//32218315642.html" target="blank"]Product tracking link[/tracking-link]
```

### All available shortcode parameters

| **Parameter name** | **Synonym**    | **Required?** | **Description**                                                 |
| ------------------ | -------------- | ------------- | --------------------------------------------------------------- |
| advertiser         | advertiser\_id | Yes           | Merchant domain or Advertiser ID                                |
| module             | module\_id     | No            | Module name. For example: Admitad, Awin, Demo.                  |
| anchor             | text           | No            | Link anchor text. If omitted, the URL is used as the link text. |
| product            | product\_url   | No            | URL of the product.                                             |
| class              |                | No            | CSS class for the link.                                         |
| target             |                | No            | `target` attribute.                                             |
| rel                |                | No            | `rel` attribute. Defaults to `nofollow`.                        |

### How to make a tracking link with custom attributes

WordPress doesn't officially support shortcodes inside HTML, but it still works in the HTML editor.

In the Gutenberg editor, add a Custom HTML block, or switch to the Code editor in the Classic Editor.

![](/files/-M6Gtoe4Ev3fTxFn8VXT)

You can then add an `href` attribute to create a custom link:

```php
<a href="[tracking-link advertiser=15767 /]">My custom link</a>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ctracker-docs.keywordrush.com/shortcodes/tracking-links-shortcode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
