# Trigger element presence using class and form id?

**URL:** <https://community.piwik.pro/t/trigger-element-presence-using-class-and-form-id/5538>\
**Category:** Data collection and tags\
**Created:** [April 8, 2026, 4:02pm UTC](https://community.piwik.pro/t/trigger-element-presence-using-class-and-form-id/5538 "2026-04-08T16:02:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gralli](https://avatars.discourse-cdn.com/v4/letter/g/bb73d2/32.png) [@gralli](https://community.piwik.pro/u/gralli)\
**Post date:** [April 8, 2026, 4:02pm UTC](https://community.piwik.pro/t/trigger-element-presence-using-class-and-form-id/5538/1 "2026-04-08T16:02:49Z")

</div>

I have a form that I want to track conversions for.

This form uses AJAX to reload, so I want to use Element presence trigger to capture the class that appears after a form is submitted (I’ve found the Form submission trigger unreliable in the past).

This form is also on a page with other forms that have the same submission message class. So, I wanted to use the form’s data-form-ID _and_ the submission message class in the trigger. This way, I can capture form submissions for only that form.

Is it possible to do this? Is there another way to do this?

I’ve tried combining the class and ID (e.g. .SubmissionMessageClass[data-form-id=“12345-12345-12345”]), but the tag won’t fire. The tag _will_ fire when the Element presence CSS selector is just the class (e.g. .SubmissionMessageClass).

---

<div class="post-metadata">

**Author:** ![sararekowska](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/sararekowska/32/1582_2.png) [@sararekowska](https://community.piwik.pro/u/sararekowska)\
**Post date:** [April 13, 2026, 9:40am UTC](https://community.piwik.pro/t/trigger-element-presence-using-class-and-form-id/5538/2 "2026-04-13T09:40:44Z")

</div>

Hi! You could add two separate element presence triggers and combine them in a [trigger group](https://help.piwik.pro/support/tag-manager/trigger-group/):

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