Linkedin Event-Specific Image Pixel

Support forumCategory: QuestionsLinkedin Event-Specific Image Pixel
Lluc asked 4 years ago
Hi, I just created a new conversion to track an event-specific image pixel after the easy appointments form is submitted but for the moment I haven't been able to make it work. I just created the specific event in Linkedin with the following code: https://dc.ads.linkedin.com/collect/?pid=xxxxxxx&conversionId=xxxxxxxx&fmt=gif So, what I did is create this function function addLinkedinTag(){
var imgtag = document.createElement('img');
imgtag.height = '1';
imgtag.width = '1';
imgtag.style = 'display: none;';
imgtag.alt = '';
imgtag.src = 'https://dc.ads.linkedin.com/collect/?pid=2553745&conversionId=3001105&fmt=gif';

jQuery(".ea-submit").append(imgtag);
} and then execute this function when the form is submitted by calling the function inside the easyappnewappointment call back. document.addEventListener('easyappnewappointment', function(event){
addLinkedinTag();
}, false); But unfortuntately it's not working, what am I doing wrong? Can someone help me with this? Thanks,