Anura Docs

Direct Integration

Anura Direct is ideal for a fast, pre-bid analysis of time-sensitive traffic often associated with click and programmatic campaigns, detecting suspect and non-suspect traffic, with suspect traffic aligning 100% with Anura Script.

Direct Integration - Endpoint

Direct result values may be obtained by calling the endpoint directly.

Method URL Note
GET, POST http://direct.anura.io/direct.json HTTPS recommended

Example Request

PHP
<?php
// define parameters
$params = array();
$params["instance"] = yourAssignedInstanceId;
// $params["source"] = "optionalSourceTrackingId";
// $params["campaign"] = "optionalCampaignTrackingId";
$params["ip"] = "visitorIPAddress";
// $params["ua"] = "optionalVisitorUserAgentString";
// create a query string storage array
$query_string = array();
foreach ($params as $key => $value) $query_string[] = "{$key}=".urlencode($value);
// setup and initialize curl
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://direct.anura.io/direct.json?".implode("&", $query_string));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// get direct method result
$curl_response = curl_exec($curl);
// close the curl connection
curl_close($curl);
// continue with your custom direct method result handler...
?>

Parameters

Required Type Description Note
instance integer Your instance ID.
ip string The IP address of your visitor. IPV6 addresses are also supported.
Optional Type Description Note
source string A variable, declared by you, to identify "source" traffic within Anura's dashboard interface.
campaign string A subset variable of "source," declared by you, to identify "campaign" traffic within Anura's dashboard interface.
ua string The user agent string of your visitor.

Source and campaign parameters are limited to a maximum of 128 characters.

Source and campaign parameters may not equal the following values: "all sources", "all campaigns", "&", "*", "?", "%".

Security

Anura Direct offers an optional "IP address locking" feature to protect against unauthorized use of your instance ID. Once enabled, requests will only be accepted from client authorized IP addresses. Please talk to support about enabling the direct IP address locking feature.

Example Response

{
    "result": "suspect",
    "mobile": null,
    "rule_sets": [
        "IP"
    ]
}

Result Values

Result Description
suspect Based on available data, we have determined the visitor to be suspect.
non-suspect Based on available data, we have determined the visitor to be non-suspect.

Please refer to our direct result definitions documentation for more information on these values.

Rule Set Values

Result Description
UE User Environment
DC Data Center
IP IP Integrity
WC Web Crawler

The "rule_sets" array requires "rule sets returnability" to be enabled. Talk to support about enabling or disabling the rule sets returnability feature.

Please refer to our rule set definitions documentation for more information on these values.