Mautic Community Forums

Smart way to track product views

I’m new to Mautic and am completely in awe, thanks so much for sharing this with the world!



Is there a smart way to track viewed products by users (product ids) in Mautic for ecommerce purposes? Say you have an ecommerce site, user comes to product view page, I’d like to be able to add to contact details that he/she viewed a product id XXX.



I thought of 2 methods but they’re not proper and each has its problems:


  1. Use tags: mt(‘send’, ‘pageview’, {tags:‘view_XXX’}); . This will work but doesn’t seem right + doesn’t capture the date if I understand tag system right.
  2. Create a new custom field viewedproducts, make it select-multiple and then do javascript wizardry but this is way too messy as it requires pre-creating all product ids and won’t work efficiently with a few thousand products.



    In an ideal world, I’d love to be able to capture the viewed product and the view date.



    Any ideas/suggestions?

I’m new to Mautic and am completely in awe, thanks so much for sharing this with the world!

Is there a smart way to track viewed products by users (product ids) in Mautic for ecommerce purposes? Say you have an ecommerce site, user comes to product view page, I’d like to be able to add to contact details that he/she viewed a product id XXX.

I thought of 2 methods but they’re not proper and each has its problems:

  1. Use tags: mt(‘send’, ‘pageview’, {tags:‘view_XXX’}); [I had to include ‘pageview’, it didn’t work otherwise, I could be wrong]. This will work but doesn’t seem right + doesn’t capture the date if I understand tag system right.
  2. Create a new custom field viewedproducts, make it select-multiple and then do javascript wizardry but this is way too messy as it requires pre-creating all product ids and won’t work efficiently with a few thousand products.

In an ideal world, I’d love to be able to capture the viewed product and the view date.

Any ideas/suggestions?