---
title: encodeTrackingLinks
slug: campaign/docs/encodetrackinglinks
docTags: 
createdAt: 2026-07-02T19:01:46.737Z
---

The mailing is not altered in any way. See also [decodeTrackingLinks](docId\:MWNmUPJLjYCREEPLDEEkO).

**Type**: String

**Parameters**

| Name      | Type   | Value                                                                                                        |
| --------- | ------ | ------------------------------------------------------------------------------------------------------------ |
| sessionId | String | ID of the session                                                                                            |
| mailingId | long   | ID of the mailing                                                                                            |
| content   | String | The content of the mailing (HTML code or text).                                                              |
| mimeType  | String | MIME type of the mailing (text/plain or text/html)<br /><br />The content will be treated as this MIME type. |

**Return values**

Content with all links replaced by their corresponding tracking links

**Code structure**

```java
String encodeTrackingLinks(String sessionId, long mailingId, String content, String mimeType)
```
