I have the following code in a Javascript Extension which I am using to capture a successful form submit on our Order Confirmation page.
jQuery("#checkout.co-login.simpleMastHd div.container_24 div.sb-found-wrap section div.chk-container div.chk-wrap--conf.chk-wrap div.grd-row div.grd-columns.grd-small-12 div.grd-row-10 div.chk-right.grd-gutter-left-half.grd-columns.grd-small-4 div.chk-conf-rewards-wrap.chk-box div.grd-flush.grd-row div.chk-box-section.grd-columns.grd-small-12 div.chk-box-rewards-sign-up-form-wrapper form.chk-conf-sign-up.chk-info-form").on("submit",function(e){
utag.link({cm_element_id: 'ACCOUNT: SIGNUP: SUCCESS: ORDER CONFIRMATION', cm_element_category: 'ACCOUNT: SIGNUP'});
});
cm_element_id and cm_element_category are then mapped to eid and ecat in Coremetrics, respectively, in order to fire an Element Tag.
This code works and fires an Element tag when entered into the Javascript console on Google Chrome.
However, when this code is placed in a Javascript Extension and scoped to DOM Ready, Coremetrics, or Preloader, I am not seeing the Element tag fire. What is the reason this might be happening?
... View more