Tealium event firing sometimes

Bronze Contributor
Bronze Contributor

Hi,

I have problems firing some events.

I have created an add to Cart event just like in the Tealium advanced course, followed the same steps.

When I test the events sometimes it fires and sometimes it doesnt. I have tested with the UTag debugger, filtering just the utag.link

Any clues what may be happening? 

Thanks!

image.png

3 REPLIES 3

Tealium event firing sometimes

Community Manager
Community Manager

@germanpedreira The most likely issue is that the selector is not correct for every "add to cart" link on your site. The selector in the screenshot is very specific, which means any variation in the site HTML will cause the selector not to work.

You can try a couple things to improve the selector:

  1. Use multiple selectors
    If your "add to cart" links use different DOM elements across the site, then you can match all of those selectors by using a comma-delimited list. For example: .class1, .class2, .class3
  2. Use a less specific selector
    Try trimming from the end of your selector and test. For example, it could be that a span at the end of the selector is not necessary.

For more information, see How to determine the CSS selector of an element.

Remember to "Accept as Solution" when your question has been answered and to give kudos to helpful replies.

Tealium event firing sometimes

Bronze Contributor
Bronze Contributor

@TealiumJustin Yes, it seems that the problem is with the selector.
I tried removing the span but doesnt seem to work all the times.

I have tried to add the class to the element selector but seems that I am doing it wrong.

I tried with this ones:

  • .button btn-cart
  • .btn-cart
  • add-to-cart-buttons

And a few more but they dont work, not sure what else to try.

Thanks for the help!

 

image.pngimage.png

Tealium event firing sometimes

Bronze Contributor
Bronze Contributor
 
Public