# Tracking code causing a 404 on pages

**URL:** <https://community.hubspot.com/t/tracking-code-causing-a-404-on-pages/3586>\
**Category:** Blog, Website & Page Publishing\
**Created:** [October 17, 2017, 9:00am UTC](https://community.hubspot.com/t/tracking-code-causing-a-404-on-pages/3586 "2017-10-17T09:00:08Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![rybowden](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rybowden/32/13772_2.png) [@rybowden](https://community.hubspot.com/u/rybowden)\
**Post date:** [October 17, 2017, 9:00am UTC](https://community.hubspot.com/t/tracking-code-causing-a-404-on-pages/3586/1 "2017-10-17T09:00:08Z")

</div>

We have implemented the Hubspot tracking code on our websites.

And we have the latest version on our site as of 27 days ago. But today we noticed through our automated tests that your Code is calling an URL which is causing a 404 and then the API fails.

You can see these issues on [https://www.esendex.co.uk/](https://www.esendex.co.uk/)

```auto
GET https://api.hubspot.com/messages/v2/message/public?portalId=2246691&messagesUtk=1c985514f789c85891f9a6a405969ff3&hubspotUtk=1c985514f789c85891f9a6a405969ff3 404 (Not Found)

Initial messages API call failed 
messageswidgetshell.js:1 

```

How come this has broken and when will it be fixed?

In fact, this is also happening on this forum so its suggests there been a release which has broken your tracking script.

Many Thanks

Ryan

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 17, 2017, 2:01pm UTC](https://community.hubspot.com/t/tracking-code-causing-a-404-on-pages/3586/2 "2017-10-17T14:01:18Z")

</div>

Hi,

I too have the same 404 error on my website. It’s been fine up until today.

Is there an outage with your servers? (PS I can’t click the “Email when someone replies” checkbox, it’s un-clickable!)

---

<div class="post-metadata">

**Author:** ![rybowden](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rybowden/32/13772_2.png) [@rybowden](https://community.hubspot.com/u/rybowden)\
**Post date:** [October 18, 2017, 7:34am UTC](https://community.hubspot.com/t/tracking-code-causing-a-404-on-pages/3586/3 "2017-10-18T07:34:49Z")

</div>

It does seem to be fixed now. Be good to know why it took so long.

---

<div class="post-metadata">

**Author:** ![rcole](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rcole/32/32521_2.png) [@rcole](https://community.hubspot.com/u/rcole)\
**Post date:** [October 19, 2017, 3:46am UTC](https://community.hubspot.com/t/tracking-code-causing-a-404-on-pages/3586/4 "2017-10-19T03:46:25Z")

</div>

We are facing this same issue as of a few days ago.

@rybowden - Are you sure its resovled? After going to the website you provided it see the error in the console.

---

<div class="post-metadata">

**Author:** ![rybowden](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rybowden/32/13772_2.png) [@rybowden](https://community.hubspot.com/u/rybowden)\
**Post date:** [October 19, 2017, 7:19am UTC](https://community.hubspot.com/t/tracking-code-causing-a-404-on-pages/3586/5 "2017-10-19T07:19:23Z")

</div>

Yeah, it seems to have come back 😕

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 19, 2017, 11:08am UTC](https://community.hubspot.com/t/tracking-code-causing-a-404-on-pages/3586/6 "2017-10-19T11:08:15Z")

</div>

We have the same issue since some days ago.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 20, 2017, 12:13am UTC](https://community.hubspot.com/t/tracking-code-causing-a-404-on-pages/3586/7 "2017-10-20T00:13:34Z")

</div>

+1

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 20, 2017, 1:40pm UTC](https://community.hubspot.com/t/tracking-code-causing-a-404-on-pages/3586/8 "2017-10-20T13:40:35Z")

</div>

Hello!  
I have a error on apple mobile devices  
messageswidgetshell.js:12 TypeError: undefined is not a function (evaluating ‘Object.assign(document.createEvent(“Event”),t)’)  
s @ messageswidgetshell.js:12  
messagesInitialized @ messageswidgetshell.js:1  
(anonymous function) @ messageswidgetshell.js:1

---

<div class="post-metadata">

**Author:** ![rybowden](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rybowden/32/13772_2.png) [@rybowden](https://community.hubspot.com/u/rybowden)\
**Post date:** [October 23, 2017, 7:26am UTC](https://community.hubspot.com/t/tracking-code-causing-a-404-on-pages/3586/9 "2017-10-23T07:26:39Z")

</div>

Just so you are all aware, They have confirmed the issues on the developers forum:  
[https://integrate.hubspot.com/t/error-initial-messages-api-call-failed/4744/12](https://integrate.hubspot.com/t/error-initial-messages-api-call-failed/4744/12)

---

<div class="post-metadata">

**Author:** ![Bouba](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bouba/32/62359_2.png) [@Bouba](https://community.hubspot.com/u/Bouba)\
**Post date:** [April 24, 2019, 4:19pm UTC](https://community.hubspot.com/t/tracking-code-causing-a-404-on-pages/3586/10 "2019-04-24T16:19:52Z")

</div>

Hello,

We’ve added the hubspot tracking code with GTM and we are having

the Status Code: 404 Not Found.

![Capture d’écran 2019-04-24 à 18.18.48.png](https://d2qpr2jzcazej7.cloudfront.net/optimized/3X/1/d/1d9aca2f6994605c357fe7b0be7a11b17ab9262d_2_690x12.png)

Any hints on how to solve this?

Thanks in advance
