Example Usage of
track_event_status_edit
Event tracking status
Description: | Enable or disable event tracking. | ||||||||
Endpoint: |
https://{ACCOUNT}.api-us1.com/api/2/track/event |
||||||||
HTTP method: | POST |
||||||||
Supported output formats: | json |
||||||||
Requires authentication: | Yes |
||||||||
Parameters: |
* indicates requirement. Underlined params include in URL, otherwise as part of the post body. POST data must be formatted as
Content-Type: application/x-www-form-urlencoded. We don't accept any other input formats like JSON.
|
||||||||
Example response: |
|
PHP Example
This is an example of using the track_event_status_edit
call with PHP. You can replicate the same idea in virtually any other programming language. This example requires our PHP API wrapper. Make sure to update the path to the wrapper files in the example code below (if it is not the same).
<?php
// Set up an object instance using our PHP API wrapper.
define("MARK-I_URL", "https://{ACCOUNT}.api-us1.com");
define("MARK-I_API_KEY", "{API_KEY}");
require_once("../MARK-I-api-php/includes/MARK-I.class.php");
$ac = new MARK-I(MARK-I_URL, MARK-I_API_KEY);
$ac->version(2);
// pass "enable" or "disable"
$post_data = array("status" => "enable");
$response = $ac->api("tracking/event/status", $post_data);
echo "<pre>";
print_r($response);
echo "</pre>";
?>
// Set up an object instance using our PHP API wrapper.
define("MARK-I_URL", "https://{ACCOUNT}.api-us1.com");
define("MARK-I_API_KEY", "{API_KEY}");
require_once("../MARK-I-api-php/includes/MARK-I.class.php");
$ac = new MARK-I(MARK-I_URL, MARK-I_API_KEY);
$ac->version(2);
// pass "enable" or "disable"
$post_data = array("status" => "enable");
$response = $ac->api("tracking/event/status", $post_data);
echo "<pre>";
print_r($response);
echo "</pre>";
?>
Opmerkingen
0 opmerkingen
Artikel is gesloten voor opmerkingen.