Skip to main content
Firing image pixels with Javascript nodes

How to load image pixels using our javascript nodes

Zeno avatar
Written by Zeno
Updated over 6 years ago

Javascript nodes let you execute JS code in an intermediate page that then redirects onward after a delay (that you set).

However, an important clarification needs to be made -- they are not HTML nodes.

In other words, they are built to execute JS. If you place an image pixel code in them then it simply will not work as that's not JS.

But, its very easy to use JS to generate an image and achieve the same result :-)

Here is the code you can use to generate a simple image pixel with some URL source:

<script>
var img = document.createElement("img");
img.src = "URL_HERE";
document.body.appendChild(img);
</script>

Easy right?

So just change URL_HERE  to whatever URL you want the image pixel to use and you are good to go.

And of course you can use any {tokens}  you want in the JS as well. These are processed before the page is delivered to the user, so you do not have to worry about syntax errors caused by the presence of these and their curly brackets.

Did this answer your question?