# Loading failed for the \<script\> with source

**URL:** <https://community.piwik.pro/t/loading-failed-for-the-script-with-source/3282>\
**Category:** Data collection and tags\
**Created:** [November 23, 2023, 9:23am UTC](https://community.piwik.pro/t/loading-failed-for-the-script-with-source/3282 "2023-11-23T09:23:30Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbmcargotech](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@mbmcargotech](https://community.piwik.pro/u/mbmcargotech)\
**Post date:** [November 23, 2023, 9:23am UTC](https://community.piwik.pro/t/loading-failed-for-the-script-with-source/3282/1 "2023-11-23T09:23:30Z")

</div>

I am a new Piwik user and have had PIWIK Pro active on my webshop for two months. Setting up Piwik including the funnel turned out fine with the available documentation and videos. Now I would also like to use the ecommerce reports and set up the funnel here as well. I got some error messages in the debugger which I was able to fix. But unfortunately so far no data flow and thus no reports. The site was already equipped with Google GA4 analytics, so the data layer is there. Still, I get a Javascript error. I know why the problem occurs but not how to solve it:  
Loading failed for the with source "[https://www.googletagmanager.com](https://www.googletagmanager.com)  
Loading failed for the with source "[https://mbmcargotech.containers.piwik.pro/](https://mbmcargotech.containers.piwik.pro/)

Can anyone give me a nudge in the right direction?

Regards,

Reinder Meijer

---

<div class="post-metadata">

**Author:** ![Oliwer\_Kaczmarek](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/oliwer_kaczmarek/32/3888_2.png) [@Oliwer\_Kaczmarek](https://community.piwik.pro/u/Oliwer_Kaczmarek)\
**Post date:** [November 23, 2023, 9:48am UTC](https://community.piwik.pro/t/loading-failed-for-the-script-with-source/3282/2 "2023-11-23T09:48:12Z")

</div>

Hi @mbmcargotech,

Welcome to our community!

Could you PM me with a link to where I can see the issue?

> I know why the problem occurs

Could you shed some light on that as well?

Best,  
Oliwer

---

<div class="post-metadata">

**Author:** ![mbmcargotech](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@mbmcargotech](https://community.piwik.pro/u/mbmcargotech)\
**Post date:** [November 23, 2023, 9:51am UTC](https://community.piwik.pro/t/loading-failed-for-the-script-with-source/3282/3 "2023-11-23T09:51:14Z")

</div>

Good  
morning Oliver,

I Asume yo mean the link to my website: [https://www.mbmcargotech.nl](https://www.mbmcargotech.nl). I figured out that the JS code is most likely not on the proper position in the html code. But Piwik is working without any problem and thats confusing.

Reinder

---

<div class="post-metadata">

**Author:** ![Oliwer\_Kaczmarek](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/oliwer_kaczmarek/32/3888_2.png) [@Oliwer\_Kaczmarek](https://community.piwik.pro/u/Oliwer_Kaczmarek)\
**Post date:** [November 23, 2023, 10:07am UTC](https://community.piwik.pro/t/loading-failed-for-the-script-with-source/3282/4 "2023-11-23T10:07:39Z")

</div>

From what I see when I add products to cart they do not push any information to dataLayer that’s why the tags don’t fire on the website. I guess that’s the case with all the rest of ecommerce events.

Best,  
Oliwer

---

<div class="post-metadata">

**Author:** ![mbmcargotech](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@mbmcargotech](https://community.piwik.pro/u/mbmcargotech)\
**Post date:** [November 23, 2023, 10:09am UTC](https://community.piwik.pro/t/loading-failed-for-the-script-with-source/3282/5 "2023-11-23T10:09:24Z")

</div>

OK, any idea why its not pushing data? My knowledge is (to) limited for this issue.

---

<div class="post-metadata">

**Author:** ![Oliwer\_Kaczmarek](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/oliwer_kaczmarek/32/3888_2.png) [@Oliwer\_Kaczmarek](https://community.piwik.pro/u/Oliwer_Kaczmarek)\
**Post date:** [November 23, 2023, 10:09am UTC](https://community.piwik.pro/t/loading-failed-for-the-script-with-source/3282/6 "2023-11-23T10:09:57Z")

</div>

Was it there at some point?

---

<div class="post-metadata">

**Author:** ![mbmcargotech](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@mbmcargotech](https://community.piwik.pro/u/mbmcargotech)\
**Post date:** [November 23, 2023, 10:10am UTC](https://community.piwik.pro/t/loading-failed-for-the-script-with-source/3282/7 "2023-11-23T10:10:27Z")

</div>

Sorry I don’t understand what you mean.

---

<div class="post-metadata">

**Author:** ![Oliwer\_Kaczmarek](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/oliwer_kaczmarek/32/3888_2.png) [@Oliwer\_Kaczmarek](https://community.piwik.pro/u/Oliwer_Kaczmarek)\
**Post date:** [November 23, 2023, 10:11am UTC](https://community.piwik.pro/t/loading-failed-for-the-script-with-source/3282/8 "2023-11-23T10:11:52Z")

</div>

Was the ecommerce data pushed to dataLayer before?

Trying to figure out if it was set up and stopped working at some point or if it was never set up

---

<div class="post-metadata">

**Author:** ![mbmcargotech](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@mbmcargotech](https://community.piwik.pro/u/mbmcargotech)\
**Post date:** [November 23, 2023, 10:16am UTC](https://community.piwik.pro/t/loading-failed-for-the-script-with-source/3282/9 "2023-11-23T10:16:46Z")

</div>

Ah, clear. Well I setup all the stages, assuming you mean the stages like: Ecommerce add to cart setup.

But I’m not sure if that’s what you mean. And I got error messages in the debugger. So something must have been sent or am I mistaking?

---

<div class="post-metadata">

**Author:** ![mbmcargotech](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@mbmcargotech](https://community.piwik.pro/u/mbmcargotech)\
**Post date:** [November 23, 2023, 10:19am UTC](https://community.piwik.pro/t/loading-failed-for-the-script-with-source/3282/10 "2023-11-23T10:19:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mbmcargotech](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@mbmcargotech](https://community.piwik.pro/u/mbmcargotech)\
**Post date:** [November 23, 2023, 10:21am UTC](https://community.piwik.pro/t/loading-failed-for-the-script-with-source/3282/11 "2023-11-23T10:21:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Oliwer\_Kaczmarek](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/oliwer_kaczmarek/32/3888_2.png) [@Oliwer\_Kaczmarek](https://community.piwik.pro/u/Oliwer_Kaczmarek)\
**Post date:** [November 23, 2023, 10:55am UTC](https://community.piwik.pro/t/loading-failed-for-the-script-with-source/3282/12 "2023-11-23T10:55:47Z")

</div>

**The problem** (based on add to cart):

- adding to a cart an item in the store does not send data to dataLayer,

**Why it’s a problem** :

- You are reading from dataLayer if an event occured to send data to Piwik PRO.

dataLayer is like a book of information that Piwik PRO uses to get data, but when someone adds a product to a cart on your website, the website does not update this book with new information, so Piwik PRO is not able to read this new information because it’s not there.

To fix it you have to let your developers know that they should add dataLayer events when someone adds something to a cart (and all the other ecommerce events you want to track)

Examples of dataLayer pushes [Ulepszony e-commerce dla Menedżera tagów &nbsp;|&nbsp; Universal Analytics for Tag manager &nbsp;|&nbsp; Google for Developers](https://developers.google.com/analytics/devguides/collection/ua/gtm/enhanced-ecommerce?hl=pl)

Best,  
Oliwer

---

<div class="post-metadata">

**Author:** ![mbmcargotech](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@mbmcargotech](https://community.piwik.pro/u/mbmcargotech)\
**Post date:** [November 23, 2023, 11:00am UTC](https://community.piwik.pro/t/loading-failed-for-the-script-with-source/3282/13 "2023-11-23T11:00:31Z")

</div>

I assumed the Piwik tag manager would take care of that. Its simply a lack of knowledge on my side. I never used the Google tag manager, I’m trying to use Google as less as possible. Google’s behavior is one of the reasons to go for Piwik.

Is it possible to fix it with the Piwik tag manager or do I still need Google?

---

<div class="post-metadata">

**Author:** ![Oliwer\_Kaczmarek](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/oliwer_kaczmarek/32/3888_2.png) [@Oliwer\_Kaczmarek](https://community.piwik.pro/u/Oliwer_Kaczmarek)\
**Post date:** [November 23, 2023, 11:06am UTC](https://community.piwik.pro/t/loading-failed-for-the-script-with-source/3282/14 "2023-11-23T11:06:52Z")

</div>

You can’t fix it with **google** nor **Piwik PRO** , the issue is that your website does not give information about what happens when it comes to ecommerce so the tags will not work, regardless of what tool you are using to track data from dataLayer.

To fix it you need your developers or someone who have access to the code responsible for ecommerce actions to either add those events to dataLayer or to use our [ecommerce JS methods](https://developers.piwik.pro/en/latest/data_collection/web/guides.html#e-commerce) (to skip the need for dataLayer for ecommerce)

Best,  
Oliwer
