How to create a new Datapoint Tracking Pixel api

//create datapoint tracking pixel

var model = {

   name: 'short_pixel_name',

   title: 'some title',

   tags: [{ name: 'tagname' }],

   groupId: groupId,

   encodeIp: false,

   datapointType: 1,

   typeTP: {}

};

$.ajax({

   type: "POST",

   url: 'http://apiv2.clickmeter.com/datapoints/',

   dataType: 'json',

   data: JSON.stringify(model),

   headers: { "X-Clickmeter-AuthKey": 'API-KEY', "Content-type": "application/json" }

})

.successs(function (data) {

   // data: { id: 123, uri: '/datapoints/123' }

})

.error(function (jqXhr, textStatus, errorThrown) {

   //jqXhr.responseText - { errors: {errorMessage: 'some message', errorValue: 'property name'}}

});

Have more questions? Submit a request

0 Comments

Article is closed for comments.