Skip to content

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 ​

  1. Go to Integrations and click New Integration. Enter a name and select the Redirect type.

  2. 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.

  3. Click Get Code. Paste the landing page address into the Destination URL field as is, with its own parameters.

  4. 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}
  5. Use this link in your ad network or tracker instead of a direct link to the landing page.

  6. Open the link in a browser, replacing the macros with any values. You should land on the landing page.

  7. 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.

ParameterRequiredWhat it carries
integration_keyYesIntegration key
redirect_urlYesDestination address. Starts with lowercase http:// or https:// and is passed URL-encoded
sub1–sub6NoVisit 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 seeCauseWhat to do
400 errorThe link has no redirect_url or still contains the YOUR_URL placeholderEnter the address in Destination URL and copy the link again
400 error although redirect_url is presentThe address does not start with http:// or https://, or the scheme is capitalised (Https://)Fix the start of the address
403 errorWrong integration_keyCopy the link from Get Code again
The landing page opens without some of its parametersThe destination was put into the link by hand and not encodedBuild 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 macroCheck the macro syntax in your source's documentation
The redirect works but no visits appear in StatisticsThe integration is not in the Active statusCheck the integration status

What's next ​

Adsafee — Ad Traffic Fraud Protection