# Google Tag Manager Integration Causing "Rangeerror: Maximum Call Stack Size Exceeded" on Feathery Forms

**URL:** <https://community.feathery.io/t/google-tag-manager-integration-causing-rangeerror-maximum-call-stack-size-exceeded-on-feathery-forms/902>\
**Category:** Support\
**Created:** [July 17, 2024, 6:24am UTC](https://community.feathery.io/t/google-tag-manager-integration-causing-rangeerror-maximum-call-stack-size-exceeded-on-feathery-forms/902 "2024-07-17T06:24:01Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![salehalnanih](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.feathery.io/salehalnanih/32/235_2.png) [@salehalnanih](https://community.feathery.io/u/salehalnanih)\
**Post date:** [July 17, 2024, 6:24am UTC](https://community.feathery.io/t/google-tag-manager-integration-causing-rangeerror-maximum-call-stack-size-exceeded-on-feathery-forms/902/1 "2024-07-17T06:24:01Z")

</div>

**Dear Feathery Support Team,**

I hope this message finds you well. We are experiencing a critical issue with our Feathery forms that requires immediate attention.

**Issue Description:** When integrating Google Tag Manager (GTM) with our Feathery forms, we encounter a JavaScript error: “Rangeerror: Maximum Call Stack Size Exceeded.” This error disrupts our form functionality and results in a blank page after form submission, thereby significantly affecting our analytics and marketing efforts.

**Error Details:**

- **Error Message:** “Rangeerror: Maximum Call Stack Size Exceeded”
- **Impact:** Page Error occurs, analytics data not being tracked
- **Reproduction:** The error consistently occurs when GTM is connected to Feathery forms. Disconnecting GTM resolves the issue.

**Attachments:** I have attached a screenshot of the error for your reference.

**Request:** We urgently need a fix for this issue as it is negatively impacting our marketing budget and data accuracy. Please investigate this matter and provide a solution at your earliest convenience.

**Account Details:**

- **Form ID:** fvWNkm
- **Contact Person:** Saleh Alnanih
- **Email:** [saleh@raedhealth.com](mailto:saleh@raedhealth.com)

Thank you for your prompt attention to this matter. We look forward to your swift response and resolution.

Best regards,

Saleh Alnanih

 ![2024-07-17 09.28.01](https://canada1.discourse-cdn.com/flex030/uploads/feathery/original/1X/776e1bd705d789c6fe4235ec195a61932495652b.jpeg)

---

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.feathery.io/peter/32/7_2.png) [@peter](https://community.feathery.io/u/peter)\
**Post date:** [July 17, 2024, 6:40am UTC](https://community.feathery.io/t/google-tag-manager-integration-causing-rangeerror-maximum-call-stack-size-exceeded-on-feathery-forms/902/2 "2024-07-17T06:40:56Z")

</div>

can you please provide more context:

- how are you integrating GTM? is this your own custom code or are you using our GTM integration?
- how do you reproduce this issue on the form? I’m not able to reproduce it

---

<div class="post-metadata">

**Author:** ![salehalnanih](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.feathery.io/salehalnanih/32/235_2.png) [@salehalnanih](https://community.feathery.io/u/salehalnanih)\
**Post date:** [July 17, 2024, 6:58am UTC](https://community.feathery.io/t/google-tag-manager-integration-causing-rangeerror-maximum-call-stack-size-exceeded-on-feathery-forms/902/3 "2024-07-17T06:58:07Z")

</div>

Hello Peter,

 ![Screenshot 2024-07-17 at 9.10.00 AM](https://canada1.discourse-cdn.com/flex030/uploads/feathery/original/1X/6e4505c54b3a50e261742c56717f6747852946b5.png)

We are using your GTM integration as you can see in the attached photo.

If you go to GTM integration and start connecting GTM to our form, you can just refresh the first page form and choose the last option in the menu and click continue, then the issue should appear.

---

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.feathery.io/peter/32/7_2.png) [@peter](https://community.feathery.io/u/peter)\
**Post date:** [July 17, 2024, 7:30am UTC](https://community.feathery.io/t/google-tag-manager-integration-causing-rangeerror-maximum-call-stack-size-exceeded-on-feathery-forms/902/4 "2024-07-17T07:30:49Z")

</div>

the main cause here is that you’re loading mixpanel through GTM and using our direct mixpanel integration, which conflict (as seen int he console error that says mixpanel was loaded multiple times). to resolve this, only load mixpanel a single time through either GTM or our direct mixpanel integration

---

<div class="post-metadata">

**Author:** ![salehalnanih](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.feathery.io/salehalnanih/32/235_2.png) [@salehalnanih](https://community.feathery.io/u/salehalnanih)\
**Post date:** [August 3, 2024, 5:45pm UTC](https://community.feathery.io/t/google-tag-manager-integration-causing-rangeerror-maximum-call-stack-size-exceeded-on-feathery-forms/902/5 "2024-08-03T17:45:13Z")

</div>

Hi @peter,  
We have followed your instructions and now its working but we have another challenge.

Once we tries which events are firing, we noticed that there are many pages in the form are not firing in GTM.

I had no idea why is this happening. Please find attached

1. Screenshot of the events firing in GTM.
2. Screenshot of Feathery & GTM Integration Configs.

Looking forward to have your instructions to have this fixed.

We are using a test form called (GTM TEST FORM) With FORM ID: frrAW0

 ![Screenshot 2024-08-03 at 8.44.36 PM](https://canada1.discourse-cdn.com/flex030/uploads/feathery/original/1X/edb3d140c46ad7cd42e7b8edfeb1345b7dab89c6.jpeg)

BR.

---

<div class="post-metadata">

**Author:** ![salehalnanih](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.feathery.io/salehalnanih/32/235_2.png) [@salehalnanih](https://community.feathery.io/u/salehalnanih)\
**Post date:** [August 3, 2024, 5:45pm UTC](https://community.feathery.io/t/google-tag-manager-integration-causing-rangeerror-maximum-call-stack-size-exceeded-on-feathery-forms/902/6 "2024-08-03T17:45:56Z")

</div>

![Screenshot 2024-08-03 at 8.45.49 PM](https://canada1.discourse-cdn.com/flex030/uploads/feathery/original/1X/bfc5e492652d60262ed425773c3eb142e7e02904.png)

---

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.feathery.io/peter/32/7_2.png) [@peter](https://community.feathery.io/u/peter)\
**Post date:** [August 4, 2024, 7:01am UTC](https://community.feathery.io/t/google-tag-manager-integration-causing-rangeerror-maximum-call-stack-size-exceeded-on-feathery-forms/902/7 "2024-08-04T07:01:39Z")

</div>

@eri will be able to help here

---

<div class="post-metadata">

**Author:** ![salehalnanih](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.feathery.io/salehalnanih/32/235_2.png) [@salehalnanih](https://community.feathery.io/u/salehalnanih)\
**Post date:** [August 5, 2024, 8:32am UTC](https://community.feathery.io/t/google-tag-manager-integration-causing-rangeerror-maximum-call-stack-size-exceeded-on-feathery-forms/902/8 "2024-08-05T08:32:02Z")

</div>

Hello @eri  
Any update on this, thank you so much.

BR,

---

<div class="post-metadata">

**Author:** ![salehalnanih](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.feathery.io/salehalnanih/32/235_2.png) [@salehalnanih](https://community.feathery.io/u/salehalnanih)\
**Post date:** [August 6, 2024, 9:01am UTC](https://community.feathery.io/t/google-tag-manager-integration-causing-rangeerror-maximum-call-stack-size-exceeded-on-feathery-forms/902/9 "2024-08-06T09:01:04Z")

</div>

Hello Any update on this?

@peter @eri

---

<div class="post-metadata">

**Author:** ![eri](https://avatars.discourse-cdn.com/v4/letter/e/8baadc/32.png) [@eri](https://community.feathery.io/u/eri)\
**Post date:** [August 6, 2024, 12:37pm UTC](https://community.feathery.io/t/google-tag-manager-integration-causing-rangeerror-maximum-call-stack-size-exceeded-on-feathery-forms/902/10 "2024-08-06T12:37:59Z")

</div>

Hi there - currently checking this.

---

<div class="post-metadata">

**Author:** ![eri](https://avatars.discourse-cdn.com/v4/letter/e/8baadc/32.png) [@eri](https://community.feathery.io/u/eri)\
**Post date:** [August 6, 2024, 2:03pm UTC](https://community.feathery.io/t/google-tag-manager-integration-causing-rangeerror-maximum-call-stack-size-exceeded-on-feathery-forms/902/11 "2024-08-06T14:03:19Z")

</div>

Hi @salehalnanih for each tag not firing here, are you able to confirm you are using the correct and accurate triggers?

---

<div class="post-metadata">

**Author:** ![salehalnanih](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.feathery.io/salehalnanih/32/235_2.png) [@salehalnanih](https://community.feathery.io/u/salehalnanih)\
**Post date:** [August 7, 2024, 8:46am UTC](https://community.feathery.io/t/google-tag-manager-integration-causing-rangeerror-maximum-call-stack-size-exceeded-on-feathery-forms/902/12 "2024-08-07T08:46:08Z")

</div>

Hi @eri

I just did the connection through the “Integration” tab in my form by inserting the GTM code, How I can know what are the triggers?

Another question, do I need to insert a script code in each page for this to fire?

---

<div class="post-metadata">

**Author:** ![eri](https://avatars.discourse-cdn.com/v4/letter/e/8baadc/32.png) [@eri](https://community.feathery.io/u/eri)\
**Post date:** [August 7, 2024, 2:49pm UTC](https://community.feathery.io/t/google-tag-manager-integration-causing-rangeerror-maximum-call-stack-size-exceeded-on-feathery-forms/902/13 "2024-08-07T14:49:29Z")

</div>

There’s no need for scripts here as long as the tags and triggers in GTM are set up properly.

In Feathery integration tab, we just enter the GTM container code right. Then the rest of the setup are on GTM account side.

From your screenshot, we can see on the left side that FeatheryStepLoad and Submit events are happening as expected. And from the number of your tags, are these set up for different tags per step? In any case, you should go back to your **GTM Workspace** and check your Tags are associated with the correct Triggers, and that the triggers are set up correctly (take note of the option _“This trigger fires on”_ )

(The video tutorial [here](https://www.feathery.io/integrations/google-tag-manager) is helpful for setting up the triggers for Feathery events (step load/submit). )
