We are integrating Piwik Pro Plugin with WordPress for ECommerce Tracking.
Flow:
- We want to collect data dynamically from WordPress and fed it to Piwik Pro.
- Secondly, the data should be displayed on our WordPress site:
i. On Order-Recieved page: Screenshot
Sample static code which we got from Piwik Documentation, this needs to be
implemented dynamically in Piwik Tag Manager:
window.dataLayer.push({
event: "order_confirmation",
products: [{
sku: "9",
name: "Clitheroe Golf Club",
category: [
"GBT Events 2021",
],
price: 85.00,
quantity: 1,
},
{
sku: "7",
name: "Reddish Vale Golf Club",
category: [
"GBT Events 2021",
],
price: 65.00,
quantity: 1,
},
],
order_id: "9231",
grand_total: 0.00,
subtotal: 150.00,
tax: 0.00,
shipping: 0.00,
discount: 150,
});
ii. On Checkout page: Screenshot
Sample static code which we got from Piwik Documentation,this needs to be
implemented dynamically in Piwik Tag Manager:
```
window.dataLayer.push({
event: “cart_update”,
products: [{
sku: “7”,
name: “Reddish Vale Golf Club”,
category: [
“GBT Events 2021”,
],
price: 65.00,
quantity: 1,
},
{
sku: “9”,
name: “Clitheroe Golf Club”,
category: [
“GBT Events 2021”,
],
price: 85.00,
quantity: 2,
},
],
cart_amount: 235.00,
});
iii. On Product Detail Page: [Screenshot](https://prnt.sc/1e9moyx)
Sample static code which we got from Piwik Documentation, this needs to be
implemented dynamically in Piwik Tag Manager:
window.dataLayer.push({
event: “add_item”,
products: [{
sku: “7”,
name: “Reddish Vale Golf Club”,
category: [
“GBT Events 2021”,
],
price: 65.00,
quantity: 1,
},
],
});
We want to fed dynamic data to Piwik and change according to each specific order and display the data as above screenshots on our WordPress site.
So, for these features ,do we need create a Custom WordPress plugin which can send data dynamically to Piwik ? Or is there any Piwik Pro feature which can do these ?
Please provide me if any other solution. Or if we are following long documentation then please suggest how to apply it shortly.
Thank You.