# Stg.click & stg.capturingClick not capturing the same element

**URL:** <https://community.piwik.pro/t/stg-click-stg-capturingclick-not-capturing-the-same-element/3461>\
**Category:** Data collection and tags\
**Created:** [January 10, 2024, 11:30am UTC](https://community.piwik.pro/t/stg-click-stg-capturingclick-not-capturing-the-same-element/3461 "2024-01-10T11:30:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Anode\_FR](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/thomas_anode_fr/32/1425_2.png) [@Thomas\_Anode\_FR](https://community.piwik.pro/u/Thomas_Anode_FR)\
**Post date:** [January 10, 2024, 11:30am UTC](https://community.piwik.pro/t/stg-click-stg-capturingclick-not-capturing-the-same-element/3461/1 "2024-01-10T11:30:01Z")

</div>

Hello,

I just noticed that the clicked element is different depending on the event.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/8/8a5ab6bd77deefa42f404b906137c622b9b1865b.png)

In this case, I think the correct element should be the one detected by stg.click, as it is the `<a href>` tag.

Is this normal?

Thank you!

---

<div class="post-metadata">

**Author:** ![Oliwer\_Kaczmarek](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/oliwer_kaczmarek/32/3888_2.png) [@Oliwer\_Kaczmarek](https://community.piwik.pro/u/Oliwer_Kaczmarek)\
**Post date:** [January 10, 2024, 11:41am UTC](https://community.piwik.pro/t/stg-click-stg-capturingclick-not-capturing-the-same-element/3461/2 "2024-01-10T11:41:11Z")

</div>

Hi @Thomas_Anode_FR,

Yes, stg.capturingClick and stg.click can capture different element. The reason is:

- **stg.capturingClick** - as element recognizes the exact element that is being clicked
- **stg.click** - as element recognizes the exact element that is being clicked or if there is then the closest `<a>` element.

So if you clicked na `<img>` element and this element have a `<a>` element parent (`<a> <img> </a>`) then stg.capturingClick will catch the `<img>` element, while stg.click will catch the `<a>` element.

Best,  
Oliwer

---

<div class="post-metadata">

**Author:** ![Thomas\_Anode\_FR](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/thomas_anode_fr/32/1425_2.png) [@Thomas\_Anode\_FR](https://community.piwik.pro/u/Thomas_Anode_FR)\
**Post date:** [January 10, 2024, 11:43am UTC](https://community.piwik.pro/t/stg-click-stg-capturingclick-not-capturing-the-same-element/3461/3 "2024-01-10T11:43:57Z")

</div>

Thank you Oliwer for the explanation!

However, why is my click trigger waiting for the stg.capturingClick on the stg.click event?

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/b/b924e9fab3209fd83e3fdb4feb92e5cccf40f9f6.png)

My tag won’t fire because of this condition.

Thank you again

---

<div class="post-metadata">

**Author:** ![Oliwer\_Kaczmarek](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/oliwer_kaczmarek/32/3888_2.png) [@Oliwer\_Kaczmarek](https://community.piwik.pro/u/Oliwer_Kaczmarek)\
**Post date:** [January 10, 2024, 11:48am UTC](https://community.piwik.pro/t/stg-click-stg-capturingclick-not-capturing-the-same-element/3461/4 "2024-01-10T11:48:28Z")

</div>

stg.capturingClick is used as a condition when you do not use the delayed click. What I mean by that is:

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/5/56d8c3ec2ccdda53e75b081f8eda2744d0352032.png) - this will use stg.capturingClick

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/3/3dfc3329f9c1b4c01463b76f429854d1d6ce8d0d.png) - this will use stg.click

You can change that in your trigger settings. If you want to use stg.click, turn on the “wait for tags before loading the next page” setting.

Best,  
Oliwer

---

<div class="post-metadata">

**Author:** ![Thomas\_Anode\_FR](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/thomas_anode_fr/32/1425_2.png) [@Thomas\_Anode\_FR](https://community.piwik.pro/u/Thomas_Anode_FR)\
**Post date:** [January 10, 2024, 12:03pm UTC](https://community.piwik.pro/t/stg-click-stg-capturingclick-not-capturing-the-same-element/3461/5 "2024-01-10T12:03:48Z")

</div>

Good to know! It works fine now.

Thank you, have a good day 🙂
