I’m attempting to design a universal piwik tag for my multiple e-commerce sites. As of right now, there seems to be a significant amount of customization/tag-modification required on each e-commerce page to get piwik e-commerce tracking firing. Wouldn’t it be nice if we had one universal tag for e-commerce, and then could simply perform a mapping exercise of a website to determine which pages get which code?
E-Commerce breaks down into cart, order, category/product views… so what if we did a IF/ELSE or Switch statement to see what page the visitor was on:
IF visitor_is_on_a_cart_page THEN output_cart_piwik_tag
Has anyone built something similar? Any ideas about how to execute this? Code samples would be appreciated.