Example Usage of

Retrieve site tracking code for account

Description: Retrieve the site tracking code for this account. This is the same Javascript code snippet found on the Tracking tab of the Settings page in the account. Endpoint: https://{ACCOUNT}
Endpoint: https://{ACCOUNT}
HTTP method: GET
Supported output formats: json
Requires authentication: Yes
* 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.
Variable Description
api_key*Your API key
Example response:
Variable Description
codeThe site tracking code found on the Tracking tab of the Settings page in the account.

PHP Example

This is an example of using the track_site_code 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).


// Set up an object instance using our PHP API wrapper.
define("ACTIVECAMPAIGN_URL", "https://{ACCOUNT}");

$response = $ac->api("track/site/code");

echo "<pre>";
echo "</pre>";


Questions? Discuss this API call in our developer forum