Connect Traffic via Redirect
Level: beginner · Time: about 10 minutes
Goal
Check ad traffic when you cannot put a JS tag on the landing page: you send traffic to someone else's offer, an affiliate link, or a page whose code you cannot edit. The visitor follows an Adsafee link, passes the check and lands on the destination.
Before you start
- You have an account with the Owner role: only the owner creates and configures integrations
- You know the destination — where the visitor should land after the check
- You know which macros your ad network or tracker substitutes (campaign, placement, click ID)
Steps
Go to Integrations and click New Integration. Enter a name and select the Redirect type.
Open the integration. In the Sub Parameters block, enter your traffic source's macros — for example,
{campaign_id}in sub1 and{site_id}in sub2. Save.Click Get Code. Paste the landing page address into the Destination URL field as is, with its own parameters.
Copy the finished link from the Redirect URL block. It looks like this:
https://adsafee.io/click?integration_key=YOUR_KEY&redirect_url=https%3A%2F%2Fexample.com%2Flanding%3Foffer%3D42&sub1={campaign_id}&sub2={site_id}Use this link in your ad network or tracker instead of a direct link to the landing page.
Open the link in a browser, replacing the macros with any values. You should land on the landing page.
Go to Statistics and make sure the visit has appeared. Data arrives within a few minutes.
What happens to the visitor
The visitor briefly sees an intermediate Adsafee page. It collects a browser fingerprint and sends it for checking, then forwards the visitor to the destination. If a rule with the "Show Challenge" action is attached to the integration, the visitor is forwarded after passing the challenge.
How the link is built
| Parameter | Required | What it carries |
|---|---|---|
integration_key | Yes | Integration key |
redirect_url | Yes | Destination address. Starts with lowercase http:// or https:// and is passed URL-encoded |
sub1–sub6 | No | Visit labels: campaign, placement, creative ID |
The Destination URL field encodes the address for you. URL-encode it yourself only when you build the link without this field.
Macros in the destination
If the landing page needs a click ID or another value from the source, add the macro to the destination itself: https://example.com/landing?click={clickid}. The field keeps macros in curly braces as is.
Macros in other syntaxes — [CLICK_ID], ${SUBID}, %CLICK% — are encoded by the field, and the source will not substitute them. Put such a macro into the link by hand after copying.
What to do with fraud
The link itself only checks and labels traffic. To keep suspicious visits away from the landing page, attach a rule with the "Send to Traffic Back" action to the integration and set Traffic Back in the integration settings — the address this traffic is sent to.
Result
Traffic goes through the Adsafee link, visitors reach the landing page, and Statistics shows visits broken down by sub-parameters.
Troubleshooting
| What you see | Cause | What to do |
|---|---|---|
| 400 error | The link has no redirect_url or still contains the YOUR_URL placeholder | Enter the address in Destination URL and copy the link again |
400 error although redirect_url is present | The address does not start with http:// or https://, or the scheme is capitalised (Https://) | Fix the start of the address |
| 403 error | Wrong integration_key | Copy the link from Get Code again |
| The landing page opens without some of its parameters | The destination was put into the link by hand and not encoded | Build the link with the Destination URL field |
Sub-parameters in Statistics show macro text such as {campaign_id} | The traffic source did not substitute the macro | Check the macro syntax in your source's documentation |
| The redirect works but no visits appear in Statistics | The integration is not in the Active status | Check the integration status |
What's next
- Track Quality by Campaign — traffic analysis by sub-parameters
- Handle Fraudulent Traffic — rules and Traffic Back
- Domain Parking — the link on your own domain instead of adsafee.io