# I integrated Pirsch using GTM and it gives me this error

**URL:** <https://forum.pirsch.io/t/i-integrated-pirsch-using-gtm-and-it-gives-me-this-error/60>\
**Category:** Support\
**Created:** [March 26, 2024, 4:08pm UTC](https://forum.pirsch.io/t/i-integrated-pirsch-using-gtm-and-it-gives-me-this-error/60 "2024-03-26T16:08:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chorch](https://forum.pirsch.io/user_avatar/forum.pirsch.io/chorch/32/61_2.png) [@Chorch](https://forum.pirsch.io/u/Chorch)\
**Post date:** [March 26, 2024, 4:08pm UTC](https://forum.pirsch.io/t/i-integrated-pirsch-using-gtm-and-it-gives-me-this-error/60/1 "2024-03-26T16:08:10Z")

</div>

Hello, I used the Extended Script as shown in the Documentation for GTM and I have the following error: the request you are sending is wrong.

 ![2024-03-26_12-42](https://forum.pirsch.io/uploads/default/original/1X/e96e1a85a1344667ba3384f45bc34ddb13fb5a82.png)

What could be wrong?

The website is welfi.com.ar

---

<div class="post-metadata">

**Author:** ![Chorch](https://forum.pirsch.io/user_avatar/forum.pirsch.io/chorch/32/61_2.png) [@Chorch](https://forum.pirsch.io/u/Chorch)\
**Post date:** [March 26, 2024, 4:12pm UTC](https://forum.pirsch.io/t/i-integrated-pirsch-using-gtm-and-it-gives-me-this-error/60/2 "2024-03-26T16:12:23Z")

</div>

Update: I did it directly using Ghost Code Injection on the BLOG and it worked perfectly.

I have the problem with GTM and I need to solve it because many other parts of the website I only have GTM integrated. ☹

---

<div class="post-metadata">

**Author:** ![Marvin](https://forum.pirsch.io/user_avatar/forum.pirsch.io/marvin/32/16_2.png) [@Marvin](https://forum.pirsch.io/u/Marvin)\
**Post date:** [March 28, 2024, 11:53am UTC](https://forum.pirsch.io/t/i-integrated-pirsch-using-gtm-and-it-gives-me-this-error/60/3 "2024-03-28T11:53:06Z")

</div>

Hi Chorch,

Sorry for the late reply, I’m currently on vacation 🙂

I’m not an expert when it comes to GTM, but I think you need to add it as a custom HTML snippet. Otherwise, GTM will mangle all the JavaScript together in a single file. Which is nice as it reduces page load, but we use the script tag in the HTML for configuration. Other tools behave similarly, so that’s probably the reason why you had to use code injection with Ghost.

For GTM, you can check out this article on our documentation:

> **[Pirsch Analytics Documentation](https://docs.pirsch.io/integrations/tag-manager#google-tag-manager)**
>
> Pirsch is a simple, privacy-friendly, and open-source web analytics solution.
