# eCommerce tracking is not working

**URL:** <https://community.piwik.pro/t/ecommerce-tracking-is-not-working/2578>\
**Category:** Data collection and tags\
**Created:** [July 12, 2023, 6:25am UTC](https://community.piwik.pro/t/ecommerce-tracking-is-not-working/2578 "2023-07-12T06:25:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![C92\_Cathrine](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/c92_cathrine/32/1708_2.png) [@C92\_Cathrine](https://community.piwik.pro/u/C92_Cathrine)\
**Post date:** [July 12, 2023, 6:25am UTC](https://community.piwik.pro/t/ecommerce-tracking-is-not-working/2578/1 "2023-07-12T06:25:38Z")

</div>

Hi there!

I have a problem with tracking of eCormmerce.  
I have ask my client to set this script on their website:

\_paq.push([  
event: “ecommerceOrder”,  
products: [{  
sku: “craft-311”,  
name: “Unicorn Iron on Patch”,  
category: “Crafts & Sewing”,  
price: 500,  
quantity: 3,  
brand: “DMZ”,  
variant: “blue”  
}, {  
sku: “craft-312”,  
name: “Unicorn Iron on Grass”,  
category: “Crafts & Sewing”,  
price: 300,  
quantity: 1,  
brand: “DMZ”,  
variant: “red”  
}],  
{  
orderId: “order-3415”,  
grandTotal: “1800”,  
subTotal: “1200”,  
tax: “396”,  
shipping: “600”,  
discount: “180”  
}  
]);

In the PIWIK tag manager - i have put it up like this:

TAG: custom code (async):

TRIGGER: (Data layer event)  
Event name EQUALS ecommerceOrder

This is usually how i set up eCommerce tracking for my clients and normally it works - but not this time! - Does anyone knows where the mistake are?

Hope you can help

Have a lovely day

Cathrine

---

<div class="post-metadata">

**Author:** ![sararekowska](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/sararekowska/32/1582_2.png) [@sararekowska](https://community.piwik.pro/u/sararekowska)\
**Post date:** [July 12, 2023, 10:13am UTC](https://community.piwik.pro/t/ecommerce-tracking-is-not-working/2578/2 "2023-07-12T10:13:36Z")

</div>

Hi Cathrine, it seems there are some additional pieces in your code that you don’t need in order to send an ecommerceOrder() method. Both “event:” and “products:” are not needed in this case, so you can just leave “ecommerceOrder” and the list of products by themselves.

I also recommend you to take a look at our article about setting up ecommerce tracking: [Set up ecommerce tracking | Piwik PRO help center](https://help.piwik.pro/support/getting-started/track-ecommerce/). You can find practical examples of the methods and sytnax there.

Let me know if this fixes your issue.

---

<div class="post-metadata">

**Author:** ![C92\_Cathrine](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/c92_cathrine/32/1708_2.png) [@C92\_Cathrine](https://community.piwik.pro/u/C92_Cathrine)\
**Post date:** [July 13, 2023, 6:04am UTC](https://community.piwik.pro/t/ecommerce-tracking-is-not-working/2578/3 "2023-07-13T06:04:59Z")

</div>

Hi there!  
Thank you for answering!  
I have tried to remove the pieces in my code, that i dont need and yet its not working ☹

---

<div class="post-metadata">

**Author:** ![sararekowska](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/sararekowska/32/1582_2.png) [@sararekowska](https://community.piwik.pro/u/sararekowska)\
**Post date:** [July 13, 2023, 6:43am UTC](https://community.piwik.pro/t/ecommerce-tracking-is-not-working/2578/4 "2023-07-13T06:43:05Z")

</div>

Hi,

Could you try running the piece of code in the console in developer tools and see if there is any error popping up?

---

<div class="post-metadata">

**Author:** ![C92\_Cathrine](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/c92_cathrine/32/1708_2.png) [@C92\_Cathrine](https://community.piwik.pro/u/C92_Cathrine)\
**Post date:** [July 13, 2023, 7:36am UTC](https://community.piwik.pro/t/ecommerce-tracking-is-not-working/2578/5 "2023-07-13T07:36:14Z")

</div>

![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/3/381c1f93215be94e0247a1bae5382d219eebd475.png)

It says this right here 🙂

---

<div class="post-metadata">

**Author:** ![sararekowska](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/sararekowska/32/1582_2.png) [@sararekowska](https://community.piwik.pro/u/sararekowska)\
**Post date:** [July 13, 2023, 8:08am UTC](https://community.piwik.pro/t/ecommerce-tracking-is-not-working/2578/6 "2023-07-13T08:08:50Z")

</div>

Thanks! This error is caused because you didn’t include the `_paq.push([` at the beginning 😄 Could you try it again with this line at the start?

---

<div class="post-metadata">

**Author:** ![C92\_Cathrine](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/c92_cathrine/32/1708_2.png) [@C92\_Cathrine](https://community.piwik.pro/u/C92_Cathrine)\
**Post date:** [July 13, 2023, 8:28am UTC](https://community.piwik.pro/t/ecommerce-tracking-is-not-working/2578/7 "2023-07-13T08:28:32Z")

</div>

Still the same 🙂

![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/e/effa8aca188531dcfbbdf167fedc1e927c9d68e3.png)

---

<div class="post-metadata">

**Author:** ![C92\_Cathrine](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/c92_cathrine/32/1708_2.png) [@C92\_Cathrine](https://community.piwik.pro/u/C92_Cathrine)\
**Post date:** [July 13, 2023, 8:37am UTC](https://community.piwik.pro/t/ecommerce-tracking-is-not-working/2578/8 "2023-07-13T08:37:57Z")

</div>

I MADE IT WORK!  
Thanks for the help 😃 😃 😃
