Enables the 3rd party tracking code feature for the specified placement, allowing its configured tracking codes to fire during ad serving.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/tracking-code/placement/enable-tracking-code.do
Enables the 3rd party tracking code feature for the specified placement, allowing its configured tracking codes to fire during ad serving. Switched on from off, the placement starts with an empty tracking code set; add codes afterwards. Already on, nothing changes and its codes are kept. Returns a JSON object with a 'success' boolean indicating whether the operation completed successfully.
Form Params
idintegerrequired
The unique numeric identifier of the placement to enable tracking codes for
4001
Responses
200
Operation result with success status
400
Bad request — invalid or missing parameters
401
Authentication error
403
The role lacks the PLACEMENT_THIRD_PARTY_TRACKING permission, or no UPDATE share on the placement
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/tracking-code/placement/enable-tracking-code.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new FormUrlEncodedContent(new Dictionary<string, string> { ["id"] = "4001" });
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());