# Can I use trigger groups (as is possible in GTM)?

**URL:** <https://community.piwik.pro/t/can-i-use-trigger-groups-as-is-possible-in-gtm/449>\
**Category:** Data collection and tags\
**Created:** [February 2, 2022, 3:42pm UTC](https://community.piwik.pro/t/can-i-use-trigger-groups-as-is-possible-in-gtm/449 "2022-02-02T15:42:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![michiel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/michiel/32/236_2.png) [@michiel](https://community.piwik.pro/u/michiel)\
**Post date:** [February 2, 2022, 3:42pm UTC](https://community.piwik.pro/t/can-i-use-trigger-groups-as-is-possible-in-gtm/449/1 "2022-02-02T15:42:01Z")

</div>

We’re test-driving Piwik PRO and are looking to migrate away from Google Analytics and Tag Manager. One of the things I can’t really figure out is if it is possible in Piwik’s tag manager to create _trigger groups_.

One of the use cases would be firing an event on 25% page scroll **and** 15 seconds page dwell, which to me would indicate a ‘qualitative’ visit.

---

<div class="post-metadata">

**Author:** ![maciej](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/maciej/32/9_2.png) [@maciej](https://community.piwik.pro/u/maciej)\
**Post date:** [February 2, 2022, 5:54pm UTC](https://community.piwik.pro/t/can-i-use-trigger-groups-as-is-possible-in-gtm/449/2 "2022-02-02T17:54:55Z")

</div>

There are no trigger groups, but I think this case can be solved by:

1. Create a tag that will set a variable A and push ‘check\_visit’ event on data layer. Fire this tag using scroll trigger set to 25%
2. Create a tag that will set a variable B and push ‘check\_visit’ event on data layer. Fire this tag using timer trigger set to 15 seconds
3. Create the actual tag you want to fire on ‘qualitative visit’. Fire this tag using data layer trigger on ‘check\_visit’ event. Add conditions to this trigger to fire it only when variable A & B are set.

Let me know if this helps, if you get stuck, we’ll try to come up with code examples for that implementation 🙂

---

<div class="post-metadata">

**Author:** ![michiel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/michiel/32/236_2.png) [@michiel](https://community.piwik.pro/u/michiel)\
**Post date:** [February 3, 2022, 7:38am UTC](https://community.piwik.pro/t/can-i-use-trigger-groups-as-is-possible-in-gtm/449/3 "2022-02-03T07:38:15Z")

</div>

Thanks for your help, @maciej!

A code example would be helpful, not entirely sure how to do this myself… 😉

---

<div class="post-metadata">

**Author:** ![Pawel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/pawel/32/238_2.png) [@Pawel](https://community.piwik.pro/u/Pawel)\
**Post date:** [February 3, 2022, 1:35pm UTC](https://community.piwik.pro/t/can-i-use-trigger-groups-as-is-possible-in-gtm/449/4 "2022-02-03T13:35:13Z")

</div>

Hi @michiel  
Here you can find the implementation example which you can import directly to your website. (If you don’t want to lose your current setup, try importing it on another website).  
Go to Tag Manager → Settings → Import from file  
[2022-02-03 13-06-55 - Trigger groups (a873389d-987b-4f0b-a884-bd77f270882a).json](https://community.piwik.pro/uploads/short-url/o9SE23vwYiX08ZJz3V1TAUSQqF.json) (9.5 KB)  
The most important thing is to create a data layer trigger for your actual tag based on two variables (scroll & time). See the screenshot below.

 ![Screenshot 2022-02-03 at 14.30.45](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/ae12ba443493e85e2c36a49d877e0205469539a5.jpeg)

---

<div class="post-metadata">

**Author:** ![michiel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/michiel/32/236_2.png) [@michiel](https://community.piwik.pro/u/michiel)\
**Post date:** [February 3, 2022, 6:45pm UTC](https://community.piwik.pro/t/can-i-use-trigger-groups-as-is-possible-in-gtm/449/5 "2022-02-03T18:45:35Z")

</div>

Thanks, @Pawel! I imported the implementation example on a test domain and copied the tags, triggers and variables to my the main website. I can’t seem to get it right. Could it be that the timer trigger only fires once per session instead of at every pageview?

---

<div class="post-metadata">

**Author:** ![Pawel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/pawel/32/238_2.png) [@Pawel](https://community.piwik.pro/u/Pawel)\
**Post date:** [February 4, 2022, 8:57am UTC](https://community.piwik.pro/t/can-i-use-trigger-groups-as-is-possible-in-gtm/449/6 "2022-02-04T08:57:53Z")

</div>

@michiel have you tried to test it in debug mode? What’s the exact problem? “The actual tag” is not firing at all or it works differently than expected?

---

<div class="post-metadata">

**Author:** ![michiel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/michiel/32/236_2.png) [@michiel](https://community.piwik.pro/u/michiel)\
**Post date:** [February 4, 2022, 12:29pm UTC](https://community.piwik.pro/t/can-i-use-trigger-groups-as-is-possible-in-gtm/449/7 "2022-02-04T12:29:27Z")

</div>

Yes, I tested it in debug mode and from what I see:

1. The 25% scroll tag fires on scroll = 25%,
2. The 15 sec. timer tag doesn’t fire, but I do see the stg.timer for 15 sec. in the event log,
3. In the event log I do see the dwell\_time\_conf event, but no tags are fired.

I can share an export of my tag manager if that helps?

---

<div class="post-metadata">

**Author:** ![Pawel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/pawel/32/238_2.png) [@Pawel](https://community.piwik.pro/u/Pawel)\
**Post date:** [February 4, 2022, 4:08pm UTC](https://community.piwik.pro/t/can-i-use-trigger-groups-as-is-possible-in-gtm/449/8 "2022-02-04T16:08:32Z")

</div>

@michiel sure, you can share the export file, so we can check it

On the other hand, timer tag would fire only once per session, so If you testing it you should delete your cookies each time.

I assume that your goal is to measure qualitative visit (not qualitative page view) = so triggering once per session shouldn’t be a problem.

---

<div class="post-metadata">

**Author:** ![michiel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/michiel/32/236_2.png) [@michiel](https://community.piwik.pro/u/michiel)\
**Post date:** [February 10, 2022, 2:47pm UTC](https://community.piwik.pro/t/can-i-use-trigger-groups-as-is-possible-in-gtm/449/9 "2022-02-10T14:47:01Z")

</div>

Hi @Pawel,  
Sorry I didn’t get back to you sooner, but I finally figured it out. 😉 Thanks for your help!
