Trouble tracking clicks on element CSS selector. Alternatives? | Community
Skip to main content
Level 2
Nov 20, 2021 12:40 AM UTC
Solved

Trouble tracking clicks on element CSS selector. Alternatives?

Hi there - 

 

Just trying to figure out Adobe Launch. I am looking to track clicks on a live chat button. I'm not exactly a coder but -

 

With the following code, is it possible to create a rule around the "class" value? Alternatively, can I use the text of the button "Live Chat"? 

 

<button _ngcontent-tiq-c79="" type="button" data-backdrop="false" class="chatButton"> Live Chat </button>

 

What I've tried already? I tried using CSS selector but it seems to be different for every button sonce we are using Angular. The "class" and text value "Live Chat" seem to be the only consistent values.

 

Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
VaniBhemarasetty
VaniBhemarasettyAccepted solution
Employee
Nov 20, 2021 1:56 PM UTC

@puckingfeachy You can create a rule for the click of an CTA in Adobe Launch. Similar to this 

Similar discussions on the similar query https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/how-to-track-the-click-button-through-launch-data-element-and/td-p/303324

 

Hope this helps

3 replies

VaniBhemarasetty
VaniBhemarasettyAccepted solution
Employee
Nov 20, 2021 1:56 PM UTC

@puckingfeachy You can create a rule for the click of an CTA in Adobe Launch. Similar to this 

Similar discussions on the similar query https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/how-to-track-the-click-button-through-launch-data-element-and/td-p/303324

 

Hope this helps

Translate
Level 2
Nov 27, 2021 2:18 PM UTC

Hey @vanibhemarasetty VaniBhemarasetty - 

Thanks for your helpful reply!

How do I know what value to put in the highlighted area?

Can I put class? id? or some other value?

For example - if I right click on my target element and go to "Inspect" - then within the "Elements" panel I right click on the code behind my target element and select "Copy" > "Selector" - I get:

#giportal > modal-container > div > div > div.modal-body > div.buttons.ng-star-inserted > button

The above seems like a lot compared tot he example you provided above.

 

I guess I'm curious to know how to get the "CSS Selector".

Thanks,

pfeach.

Translate
VaniBhemarasetty
Employee
Nov 27, 2021 2:44 PM UTC

@puckingfeachy You can read about it here on how to get css selector

 

https://amasty.com/knowledge-base/product-labels-find-css-selector.html

 

Translate