# Mautic tracking site activities other than page view

**URL:** <https://forum.mautic.org/t/mautic-tracking-site-activities-other-than-page-view/18856>\
**Category:** General Discussion\
**Created:** [April 6, 2021, 2:17am UTC](https://forum.mautic.org/t/mautic-tracking-site-activities-other-than-page-view/18856 "2021-04-06T02:17:58Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![leoschuler](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/leoschuler/32/4798_2.png) [@leoschuler](https://forum.mautic.org/u/leoschuler)\
**Post date:** [April 6, 2021, 2:17am UTC](https://forum.mautic.org/t/mautic-tracking-site-activities-other-than-page-view/18856/1 "2021-04-06T02:17:58Z")

</div>

this is a snippet from mautic documentation:

> ### Other Online Monitoring
> 
> There are several other ways to monitor contact activity and attach points to those activities. Website monitoring is only one way to track contacts. Other contact monitoring activities can consist of forum posts, chat room messages, mailing list discussion posts, GitHub/Bitbucket messages, code submissions, social media posts, and a myriad of other options.

there is nothing else saying about this monitoring, neither examples on how to track, I would imagine it would be something similar as facebook or google analytics, but I could not find a place to confirm that.  
can I use something like this:

```auto
mt('send', 'addcart',{ product: "XXXX" } )

```

that would track custom events? maybe by adding notes or a history entry for the contact so I can create campaings over it

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [April 7, 2021, 1:34pm UTC](https://forum.mautic.org/t/mautic-tracking-site-activities-other-than-page-view/18856/2 "2021-04-07T13:34:08Z")

</div>

This would also include custom segment creation and custom campaign events probably. Not that simple I think. Especially, that you are looking for multi dimansional data: event addcart + product name. Possible also price? 🙂

See this discussion:

> <https://github.com/mautic/mautic/issues/6389>
>
> | Feature request|
> Description:
> Events are the actions that users are taking on your site, within your app or while interacting with your...

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [April 7, 2021, 1:59pm UTC](https://forum.mautic.org/t/mautic-tracking-site-activities-other-than-page-view/18856/3 "2021-04-07T13:59:48Z")

</div>

Also: when you look at the event table, the events are connected to bundles, and objects there:  
I guess you define them there.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/1/1990b4ccedaa7c88edea4421290c02d51afb29ca.png)

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [April 7, 2021, 5:06pm UTC](https://forum.mautic.org/t/mautic-tracking-site-activities-other-than-page-view/18856/4 "2021-04-07T17:06:14Z")

</div>

> [@leoschuler](#):
>
> ```auto
> mt('send', 'addcart',{ product: "XXXX" } )
> 
> ```
> 
> that would track custom events? maybe by adding notes or a history entry for the contact so I can create campaigns over it

You could essentially accomplish this by creating a segment using

 ![Screenshot (51)](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/6/64e161f6d6ed50c894a3a31c52f142d48a8fded5.png)

and use the segment for a specific campaign.

---

<div class="post-metadata">

**Author:** ![leoschuler](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/leoschuler/32/4798_2.png) [@leoschuler](https://forum.mautic.org/u/leoschuler)\
**Post date:** [April 7, 2021, 8:12pm UTC](https://forum.mautic.org/t/mautic-tracking-site-activities-other-than-page-view/18856/5 "2021-04-07T20:12:32Z")

</div>

in my specific scenario, adding products to the cart is build thru javascript, the user can add several products by clicking in add to cart button from a single page (which list several products), so no new Page hits will be recorded while performing those actions.

I think my approach to this problem will be to expand that existing javascript code to do one of the following:

1. requesting mautic tracking gif with the parameter I want to track, example:

```auto
/mtracking.gif?page_url=mycart.add&page_title=Add%20Product%20To%Cart&email=...&product=...

```

1. submiting a mautic form with the information I want

Both ways would be a viable solution in general, I think the form submission would be better since the data is send as a POST method without giving away information in GET url.

regarding adding contact to segments or campaigns: the form submission seems a better solution if you want to act right away after submission, such send e-mails , adding user to campaings, etc. the tracking.gif seems better fit for a later cross analysis of several pages navigation and creating segmentation after that, but I think it is possible to do a similar thing with form submission, I will have to look into more details about that.

I will update this post once I finish implementing a solution for myself. hopefully I will be able to provide some insights for people trying to achieve similar things.

---

<div class="post-metadata">

**Author:** ![ericgr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ericgr/32/5505_2.png) [@ericgr](https://forum.mautic.org/u/ericgr)\
**Post date:** [December 15, 2021, 11:00pm UTC](https://forum.mautic.org/t/mautic-tracking-site-activities-other-than-page-view/18856/6 "2021-12-15T23:00:36Z")

</div>

@leoschuler did you ever get an example working? I would love to be able to do some of these things as well, such as track when someone clicks a button that opens a modal window. Right now, I’m thinking maybe I would use an iframe so that a ‘page hit’ gets generated, but while I don’t mind iframes, it seems cumbersome for this. I would much rather add a snippet of javascript to the button click that calls a function that updates the contact record.

---

<div class="post-metadata">

**Author:** ![leoschuler](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/leoschuler/32/4798_2.png) [@leoschuler](https://forum.mautic.org/u/leoschuler)\
**Post date:** [December 31, 2021, 4:08pm UTC](https://forum.mautic.org/t/mautic-tracking-site-activities-other-than-page-view/18856/7 "2021-12-31T16:08:07Z")

</div>

Hi Eric,

I have created a video to answer you, explaining the current implementation that I am doing and additional things that I am planning - usually people don’t have 17 minutes to watch / read an answer, I tried to be brief, but I did not rehearse and sometimes was hard to find the words. here is a guide of what I talked:  
00:00 - [Intro & Demo]  
03:05 - [Overview of the Implementation]  
03:39 - [Mautic Tracking Pixel]  
5:05 - [About Tag Manager]  
12:00 - [Google Analytics with Mautic]

[![](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/4/471d4aea5b7b8dd9074baf6b015cafefa7f86436.jpeg "Tracking Custom Events in Mautic") ](https://www.youtube.com/watch?v=tODrdGpDPEY)

To download the tag template, use this link: [gtag-mautic-event on gitHub](https://github.com/leoschuler/gtag-mautic-event)

---

<div class="post-metadata">

**Author:** ![leoschuler](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/leoschuler/32/4798_2.png) [@leoschuler](https://forum.mautic.org/u/leoschuler)\
**Post date:** [December 31, 2021, 4:18pm UTC](https://forum.mautic.org/t/mautic-tracking-site-activities-other-than-page-view/18856/8 "2021-12-31T16:18:21Z")

</div>

and happy new year!

---

<div class="post-metadata">

**Author:** ![ericgr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ericgr/32/5505_2.png) [@ericgr](https://forum.mautic.org/u/ericgr)\
**Post date:** [December 31, 2021, 11:47pm UTC](https://forum.mautic.org/t/mautic-tracking-site-activities-other-than-page-view/18856/9 "2021-12-31T23:47:49Z")

</div>

@leoschuler!! This is amazing! This is a very helpful video explanation, thank you very much. I understand what you are doing and how you are doing it and I will begin experimenting with it in the next few days. Your custom templates look like they will be very helpful, as well. I am familiar with GTM and have implemented it in my site, but have not explored some of the more complex abilities.

Again, thank you for taking the time to make such an excellent and in-depth tutorial. I have seen many posts around looking for this kind of functionality for Mautic and this is a big help.

Thank you, and Happy New Year to you!

---

<div class="post-metadata">

**Author:** ![jgroen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jgroen/32/6664_2.png) [@jgroen](https://forum.mautic.org/u/jgroen)\
**Post date:** [March 14, 2022, 7:36pm UTC](https://forum.mautic.org/t/mautic-tracking-site-activities-other-than-page-view/18856/10 "2022-03-14T19:36:10Z")

</div>

This is awesome, thanks Leo!
