Tag is firing only once per page load.

I have a tag to fire on multiple buttons of a page. I set the extension and the tag is firing but its firing only once per the page load. How can I make the tag fire on every click on the buttons irrespective of the page load/refresh.

View Entire Topic

If you wish to trigger track event on different buttons for different values, refer the example below,

$(document).ready(()=>{
  $('.button-1').on('click',()=>{
    // track logic for button-1 
  });
  $('.button-2').on('click',()=>{
    // track logic for button-2
  });
  $('.button-3').on('click',()=>{
    // track logic for button-3
  });
})

If same properties needs to be tracked for all buttons, refer the example below,

$(document).ready(()=>{
  $( '.button-1 , .button-2 , .button-3 ').on('click',()=>{
    // track logic 
  });
})

P.S .make sure to use these events properly in tag template.

Rookie Contributor