Opencart Extension - What category to attribute after Site Searches

Hi All,

I’m the developer of the Opencart Extension to tie into Matomo , and I’m doing a new version to support the latest Opencart & Matomo. There’s one last thing that I’m not sure what to do - more from a principle point of view, rather than anything technical.

I’m thinking about the special case of a Product View on an eCommerce product page, as per;
https://matomo.org/docs/ecommerce-analytics/#example-tracking-a-product-page-view
But when someone arrives at that Product Page solely doing a Site Search. In this case, there is no “Category” they have navigated through.

What do you think I should track as the category in this situation? I see a few options, but none seem ideal;

  1. Leave as ‘false’, with no specific category. This means the eCommerce ‘Product Categories’ report has this (and any resulting sales!) marked against “Product Category not defined”.
  2. Pick a category the product is in, say a primary one. This seems problematic and is my least favourite. This seems biased, and what do I pick the category based on?
  3. Report the array of all the categories the product is in. Again, slightly problematic, but not nearly as much. This means the statistics for the categories may be skewed. It will show as a view/sale against this category where this category itself was never viewed and arguably shouldn’t get the sale? e.g. if using the conversion rates of Categories to improve landing pages, the figures won’t only reflect the effect of the category page.
  4. Report a separate ‘special’ category e.g. “Site Search Result”. This is similar to 1) but superior as it doesn’t have a nasty undefined. It also keeps the statistics for the category pages more accurate if using for the landing pages, but maybe less accurate if you want to see how many items sold which exist in a specific category.

It all depends what the intent is and what users usually use the “Product Categories” report for, which I don’t know as much about. Any opinions based on your experience?

Thanks!
Kevin

I vote for 4+2 e.g. “Site search primary product category” or 2+4 “Primary product category site search”

It’s a operational view and vote, since you u refer to a product page view.

2 only is compelling too

Hey Pak, thanks for your input, really useful. I’ve realised this isn’t limited to Site Search actually, the same challenge applies for any cart operations or ecommerce orders.

Ideally I would hope that Matomo could track the progression of the user through the site, and attribute each action e.g. eCommerce Order, to a Category based on it’s analytics e.g. if someone buys Product “A” after navigating through category “Phones” that sale would be attributed to “Phones”. As it stands I have to name a category when the purchase happens, but the page data in PHP at that point (on Checkout Success page) has no idea about the categories visited 1, 2, 3 or more pages ago which the sale should be attributed to.

I suppose I could add lots of variables and track the users progression through the website myself to work out the attribution, but seems to be taking on the duty of analytics so I’m hesitant to make it too complicated.

At the moment for the first release I have just gone for attributing to All categories the product is in. Many stores will just have a simple hierarchy with only 1 category for each product so will work perfect for that. For more complex situations I will revise once I get some feedback from people and see what the preference is.

Thanks for your input, any more ideas keep em coming!

PS. New extension now available at https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=38622

Although the topic is 3 years old I will just ask: Is there still available the Opencart plug-in for Version 3.0.3.8
I’ve really tried to get accurate data as Analytics/ Google Ads are reporting bogus data.
Right now the Opencart Marketplace page is a 404 page.

Many thanks in advance,
D

1 Like

It is still the 404 page for the plugin. Is there any updates in this matter?

Ideally, I would like Matomo to have the capability to track and attribute user actions, such as eCommerce orders, to specific categories based on their analytics. For example, if a user purchases Product “A” after navigating through the “Phones” category, the sale would be attributed to the “Phones” category. However, currently, I face limitations in achieving this attribution.

In the current setup, I have to manually assign a category when a purchase occurs. However, at the point of the checkout success page in PHP, the page data doesn’t have information about the categories visited by the user in the previous pages. This lack of contextual data makes it challenging to accurately attribute the sale to the relevant category.

One potential solution would be to implement extensive tracking of the user’s progression through the website using additional variables. However, this approach can become complex and might require taking on the responsibilities of analytics, which I’m hesitant to do.

For the initial release, I have opted to attribute sales to all categories associated with the product. This approach works well for stores with a simple category hierarchy where each product is assigned to only one category. However, for more complex situations, I plan to revise this approach based on feedback from users and their preferences.

I hope that future updates to Matomo or adjustments to my implementation can provide a more accurate and automated way of attributing sales to specific categories. By refining this process, I can gain better insights into user behavior and improve the effectiveness of my analytics.