I have an amp page that I would like to track with our analytics tool.
The non amp implementation for the tracking pixel is something like this e.g.
var payload = {a:1,b2}
var img = document.createElement("img");
img.src = "http://www.examplepixel.com?data=" + encodeURIComponent(payload)
I have read the documentation on amp-pixel and amp-analytics I see no way to perform the encoding.
How can I do this?
The amp way is using amp-pixel: