Event tracking & PHP 8.1 or 8.2 support

Merchant
من Slovenia
عضو منذ أكتوبر 2023

Hi,

I just install module and integrate it with matomo and have one question about purchase event tracking.

Does module track purchases? What event should I create in matomo that LiteCart will send right data?

Module also don't support php 8.1 or 8.2, can you please update?

Best regards,
Tine

LiteCart Fan
من Sweden
عضو منذ يوليو 2015

I havn't solved the product reporting into Matomo. Is there anyone out there who can help?

Merchant
من Slovenia
عضو منذ أكتوبر 2023

Hi,

I insert in layuts/default.php:

<script async src="/includes/templates/default.catalog/js/matomo.js"></script>

 js file like this, but seems not send data to matomo:


 */

var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//www.myurl.com/matomo/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '2']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  })();

// Product Page: Detail
  if (window.location.pathname.match(/\/product$/) || window.location.pathname.match(/-p-[0-9]+$/)) {
    var product = $('#box-product');
   $(product).find('.sku .value .id .name .price').text(){
    _paq.push(['setEcommerceView',
    "$(this).data('id')", // (Required) Product identifier (SKU)
    "$(this).data('name')", // (Optional) Product name
    false, // (Optional) Product category or an array of up to 5 categories.
    $(this).data('price'), // (Optional) Product price
   _paq.push(['trackPageView']);

]);```

Where is miskate?
Merchant
من Slovenia
عضو منذ أكتوبر 2023

Hi,

I have already added matomo js tracking code website and all is working fine. I’m stuck, how to add _paq.push([‘addEcommerceItem’, parameter.

Is there should be any js script before/after?


    product_id, // (Required) Product identifier (SKU)
    product_name, // (Optional) Product name
    false, // (Optional) Product category or an array of up to 5 categories.
    price, // (Optional) Product price
    item_quantity // (Optional) Product quantity (default is 1)
]);```

Both setEcommerceView and trackEcommerceOrde work fine, but add to cart don’t work.

Do I need to add any event snippet like facebook meta when someone clicks on the chosen link or button?
أنت
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.