Direct linking lets publishers send users straight to the advertiser's page, without a redirect through a Swaarm tracking link. The click is registered by the Swaarm JS SDK on the advertiser's page instead, so you keep full attribution, sub IDs and payouts while the ad points directly at the advertiser's domain.
ℹ️ Direct Link only appears for an offer that has a Preview URL. If you don't see it, check the offer's Preview URL first.
When to use it
Ad platforms that don't allow redirects, or that require the ad's destination URL to match the advertiser's domain (for example Google Ads, Microsoft Ads, Meta).
Faster landing pages, as there is no extra redirect between the ad and the advertiser's page.
Advertisers who prefer their own URL to be visible in links and ads.
Requirements
The offer has a Preview URL (or the landing page you want to use has one). The direct link is built from it.
The advertiser can add a small JavaScript snippet to their website: to the landing page and to the pages where conversions happen.
The landing page and the conversion pages run on the same domain.
Limitations
⚠️ Same browser, same domain. The click ID is stored in the user's browser for the website's domain. Conversions are only attributed when they happen in the same browser and on the same domain as the landing page. www.advertiser.com and advertiser.com count as different domains, and so does a checkout hosted on a different domain. In those cases, fire the conversion server-side with the postback URL instead.
Browser blockers. Ad and script blockers can stop the SDK from loading. Those users can't be tracked through a direct link.
Security token. When the advertiser has a security token, it is part of the snippet and therefore visible in the page source. If that's a concern, send monetary events from the advertiser's server using the postback URL.
Google publishers. Direct Link is not offered for publishers set up with the Google integration. They keep using their regular tracking links.
Step 1 - Get the direct link (Offers → Publishers tab)
Go to Offers and open the offer.
In the lower part of the offer page, open the Publishers tab.
On the row of the publisher, click the ⋮ menu.
Choose Direct Link:
Copy copies the publisher's direct link to the clipboard.
Configure opens the direct link dialog with the setup instructions for the advertiser.
The Configure dialog
Element | Notes |
The direct link | Shown at the top, ready to copy. It is the offer's Preview URL plus the publisher's tracking parameters, for example |
Landing Page | Choose one of the offer's landing pages to link to that page's Preview URL instead. The link then also carries |
Setup instructions for the advertiser | Prefilled for this offer: your tracking domain, the advertiser's security token (if it has one), and one line of code for each event of the offer. |
Send the setup instructions to the advertiser as they are. Copy & Close copies the direct link.
Step 2 - Set up the advertiser's website
The Configure dialog generates the snippets below with the right values for the offer. They are shown here with example values.
2.1 Add the SDK to the advertiser's pages
Add this to the landing page and to every page where a conversion can happen:
html
<script src="https://cdn.jsdelivr.net/gh/swaarm/swaarmjs@master/dist/swaarm.min.js"></script> <script> Swaarm.initialize({ trackingUrl: "https://track.yourcompany.swaarm-clients.com", securityToken: "abc123" // only when the advertiser has a security token }); </script>
2.2 Register the visit on the landing page
js
Swaarm.land();
This registers the click with all the parameters of the direct link and remembers it in the user's browser for the events that follow.
2.3 Fire the events
Call the matching line when the user completes each action:
js
// Conversion (default event) Swaarm.attribute(); // Registration Swaarm.event('registration'); // Purchase, with revenue Swaarm.event('purchase', { saleAmount: 25.50, saleAmountCurrency: 'USD' });The name passed to Swaarm.event is the event's Advertiser Event ID in the offer's event settings.
⚠️ An event without an Advertiser Event ID can't be fired from the SDK, and the Configure dialog says so. Set the ID in the offer's event settings first.
Optional event details:
Option | Description |
| Revenue of the event, in the major unit (for example dollars, not cents). |
| Currency of |
| Amount and currency of the original transaction, for example for crypto or in-game currencies. |
| A numeric, non-monetary value that Swaarm sums up in reports (for example levels completed). |
| A free-form value stored with the event. |
Step 3 - Test the setup
Turn on debug logging: add
debug: truetoSwaarm.initialize({...}).Open the direct link in a fresh browser window (or a private window).
In the browser console you should see the click request, followed by
Saving clkid ….Complete a conversion on the site. The console shows the postback request.
In Swaarm, check that the click and the conversion appear in the offer's reports for that publisher.
Remove debug: true once everything works.
How it works
Click. The user lands on the advertiser's page through the direct link, for example
advertiser.com/landing?offer_id=10&pub_id=20&pub_sub_id=abc.Swaarm.land()reads the parameters from the page URL and registers the click in Swaarm. Swaarm returns a click ID, which the SDK stores in the user's browser.Conversion. When the user completes an action on a later page (for example
/signupor/checkout),Swaarm.attribute()orSwaarm.event(...)sends the conversion for the stored click ID.Everything else works as usual. Swaarm attributes the conversion to the offer and publisher, applies payouts and fires the publisher's postbacks. Fraud and validation rules, caps, reports and postbacks treat these clicks and conversions exactly like those from regular tracking links.
ℹ️ If a user arrives through a regular Swaarm tracking link instead, the advertiser's page already receives the click ID (clkid) in the URL and Swaarm.land() simply stores it. The same setup works for both kinds of links, so the advertiser only has to integrate once.
Parameters captured from the link
Swaarm.land() automatically picks up every Swaarm parameter in the landing page URL, using the same names and aliases as Swaarm tracking links. These include:
Group | Parameters |
Offer and publisher |
|
Campaign structure |
|
Ad network click IDs |
|
Device IDs |
|
User information |
|
On top of that:
UTM tags fill in missing values:
utm_campaign→campaign,utm_adset→adset,utm_ad→ad,utm_source→site,utm_term→term.The publisher click ID: the first of
gclid,fbclid,ttclid,wbraid,gbraidbecomespub_click_idwhen the link has none.
Publishers can therefore append their usual parameters to the direct link, the same way they do with tracking links:
https://advertiser.com/landing?offer_id=10&pub_id=20&pub_sub_id={your_sub_id}&gclid={gclid}
Overriding parameters
The advertiser can set or replace parameters in code. A null value removes a parameter:
js
Swaarm.land({ pub_sub_id: "homepage-banner", // replaces the value from the URL gclid: null // don't send the gclid });Swaarm.params() returns the parameters that would be sent for the current page, which is handy for checking a setup.
FAQ
Do I still need the tracking link? - No, a publisher can use either link. Advertisers who installed the SDK track both kinds of traffic with the same setup.
Does the direct link change payouts, caps or targeting? - No. Direct link clicks are registered through the same tracking pipeline as tracking-link clicks, with the same rules, caps and payouts.
Where does a user end up when the click is blocked by a rule? - They stay on the advertiser's page, because there is no redirect to stop. The click is still evaluated by the same rules as a tracking-link click and is reported with its outcome.

