TechnicalWebAnalytics/dataLayer-shopify

customBindings not detecting clicks on class, ID, or selectors

Opened this issue · 0 comments

I'm not sure if I'm doing this correctly or not but I've added classes, IDs, and selectors into the custom binding arrays similar to the format of the bindings that are labeled "do not touch" but when I have GTM Preview up, the events are not showing up when I click the associated buttons like adding a product to the cart.

customBindings = {
  cartTriggers: ['#add-to-cart,.button--cart,[data-label="Add to Cart"]'],
  viewCart: ['#edit-cart,cart'],
  removeCartTrigger: ['.mini-cart__remove,.icon-cross__container'],
  cartVisableSelector: ['.header__cart-count'],
  promoSubscriptionsSelectors: [],
  promoSuccess: [],
  ctaSelectors: [],
  newsletterSelectors: [],
  newsletterSuccess: [],
  searchPage: [],
  wishlistSelector: [],
  removeWishlist: [],
  wishlistPage: [],
  searchTermQuery: [getURLParams('q')], // replace var with correct query
};