Ecommerce Order Tracking Variables

Permalink
Hello-

I am trying to implement our Piwik Ecommerce tracking into the ecommerce order finish page. It's the same idea as Google Analytics - you pass variables into JS.

I'm trying to figure out how to call variables from C5. I was able to get:

piwikTracker.addEcommerceItem(
"", // (required) SKU: Product unique identifier
"Endurance: Shackleton's Incredible Voyage", // (optional) Product name
"Adventure Books", // (optional) Product category. You can also specify an array of up to 5 categories eg. ["Books", "New releases", "Biography"]
8.8, // (recommended) Product price
1 // (optional, default to 1) Product quantity
);
piwikTracker.trackEcommerceOrder(
"<?php echo $previousOrder->getOrderID(); ?>", // (required) Unique Order ID
<?php echo $previousOrder->getOrderTotal(); ?>, // (required) Order Revenue grand total (includes tax, shipping, and subtracted discount)
, // (optional) Order sub total (excludes shipping)
, // (optional) Tax amount
, // (optional) Shipping amount
false // (optional) Discount offered (set to false for unspecified parameter)
);


So, I was able to get "<?php echo $previousOrder->getOrderID(); ?>" and "<?php echo $previousOrder->getOrderTotal(); ?>", but I'm still trying to find the calls for Order SubTotal, Product Identifier, Product Name, Product Price, etc...

Can anyone point me in the right direction for calling out ecommerce variables on the Finish single_page type?

Thanks in advance!

 
cmscss replied on at Permalink Reply
Hi There,

Did you ever figure this out?

We're trying to accomplish a similar thing for Google Analytics E-Commerce tracking.

Cheers

Ben