Some idea about using trackLink() for feature e-Commerce

(cn_Dark) #1


I use trackLink(sourceUrl, linkType, customData) to get some data(customdata) for e-commerce.

It’s better to write a plugin, not modify or add some code of core scripts.

The hook “Tracker.Visit.isExcluded” is useful. It enable us to get the data at every pageview. I create a table ‘piwik_log_ecommerce’ to log these datas.

But there are some problems for this idea

  1. I want to link these customData with the data in table “piwik_log_visit”, so ‘idvisit’ is necessary. Is there some method to do this whitout modify core code?

  2. trackLink will make a visit(I post this problem before,you can see the detail here

(vipsoft) #2

I agree having idvisit is desirable. There was already some discussion about creating a generic table to log the custom data. Let me see if there’s already a way to get that from an event hook.