Click Stream with image pixel

74 Views Asked by At

I am working with capturing click stream variable on click. For example i want to capture value like size,color, amount once user adds any item to cart.

For this I m using jQuery("body").append(jQuery('<* img src="https://******/clickstream?text='+JSON.stringify(text)+'" />'));

Here text is a JSON Object with variable captured from clicks like size, color and it invokes a REST API to push the data. However I am getting 400 Bad Request for this.

This works fine in case of jQuery("body").append(jQuery('<*im g src="https://*****/clickstream?text='+"Some Hard coded stuff"+'" />'));

But fails for JSON.stringify(JSON Object) , gives 400

I have a REST API in JAVA , GET : /clickstream?text=text to capture the variable from clickstream

Can anyone please suggest what i m missing

Thanks in Advance

0

There are 0 best solutions below