I’m having trouble implementing a tracking pixel script, specifically with binding the script to a click event.
Here’s the JavaScript I got from the pixel tracking service provider:
<script type="text/javascript" language="javascript">
var __autoFirePixels = true;
(function() {
var script = document.createElement('script');
script.type = 'text/javascript';
script.setAttribute('async', 'true');
script.src = document.location.protocol+
'//pixel.traffiliate.com/pixel/pixels.js.php'+
'allsortsofapiinformation';
document.documentElement.firstChild.appendChild(script);
})();
</script>
I need this code to be triggered when a click-to-call button has been clicked – there are two buttons like this in the landing page.
I’m feeling the solution is right around the corner, I’d appreciate any help in finding a solution for this.
1 Answer