# Pa.js:1 Uncaught TypeError: r.split is not a function

**URL:** <https://forum.pirsch.io/t/pa-js-1-uncaught-typeerror-r-split-is-not-a-function/176>\
**Category:** General\
**Created:** [May 2, 2026, 4:09pm UTC](https://forum.pirsch.io/t/pa-js-1-uncaught-typeerror-r-split-is-not-a-function/176 "2026-05-02T16:09:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![PaulWebster](https://forum.pirsch.io/letter_avatar_proxy/v4/letter/p/eb8c5e/32.png) [@PaulWebster](https://forum.pirsch.io/u/PaulWebster)\
**Post date:** [May 2, 2026, 4:09pm UTC](https://forum.pirsch.io/t/pa-js-1-uncaught-typeerror-r-split-is-not-a-function/176/1 "2026-05-02T16:09:09Z")

</div>

Getting the following error in the console from the pirsch script, only on our homepage. [https://www.walkhighlands.co.uk/](https://www.walkhighlands.co.uk/)

pa.js:1 Uncaught TypeError: r.split is not a function

| | it | @ | pa.js:1 |
| --- | --- | --- | --- |
| | Z | @ | pa.js:1 |
| | window.pirschInit | @ | pa.js:1 |

Any help appreciated.

---

<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:** [May 2, 2026, 5:48pm UTC](https://forum.pirsch.io/t/pa-js-1-uncaught-typeerror-r-split-is-not-a-function/176/2 "2026-05-02T17:48:06Z")

</div>

Hi Paul,

Thank you for reporting 🙂

That is because you have some links with a xlink:href attribute instead of a regular href. Here is an example: …

Our script picks them up to check if they are file download links and if it needs to add an event to track them. It gets the file URL from the href attribute, which isn’t present in this case, resulting with the error you’re seeing.

We can fix this in a future update. You can also add the data-pirsch-ignore attribute to these specific links.

---

<div class="post-metadata">

**Author:** ![PaulWebster](https://forum.pirsch.io/letter_avatar_proxy/v4/letter/p/eb8c5e/32.png) [@PaulWebster](https://forum.pirsch.io/u/PaulWebster)\
**Post date:** [May 2, 2026, 6:27pm UTC](https://forum.pirsch.io/t/pa-js-1-uncaught-typeerror-r-split-is-not-a-function/176/3 "2026-05-02T18:27:10Z")

</div>

Thanks for the very fast response! I’ve removed the xlink:href and replaced with href as it appears to be deprecated (a long time ago!). However, still getting the error.

---

<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:** [May 3, 2026, 8:23am UTC](https://forum.pirsch.io/t/pa-js-1-uncaught-typeerror-r-split-is-not-a-function/176/4 "2026-05-03T08:23:12Z")

</div>

Hmm, odd. I can’t see any broken ahref attributes anymore, but there are other syntax errors in some of the links.

```auto
<a class="app-link top w-inline-block" href="app.php" ); background-size:75px'>
                                                      ^

<a class="app-link w-inline-block" href="/munros/" '>
                                                   ^

```

Maybe there are causing the error now? You can get a list by pasting the following code into your browser console and hitting enter:

```auto
document.getElementsByTagName("a")

```

---

<div class="post-metadata">

**Author:** ![PaulWebster](https://forum.pirsch.io/letter_avatar_proxy/v4/letter/p/eb8c5e/32.png) [@PaulWebster](https://forum.pirsch.io/u/PaulWebster)\
**Post date:** [May 3, 2026, 1:11pm UTC](https://forum.pirsch.io/t/pa-js-1-uncaught-typeerror-r-split-is-not-a-function/176/5 "2026-05-03T13:11:33Z")

</div>

Sorry - have removed those typos and think all a elements are valid, but still getting this error. It still seems to be recording though.

---

<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:** [May 4, 2026, 9:11am UTC](https://forum.pirsch.io/t/pa-js-1-uncaught-typeerror-r-split-is-not-a-function/176/6 "2026-05-04T09:11:14Z")

</div>

Hmm, there must be an error somewhere. Anyways, I’ll ensure that this won’t trigger an error in a future update 🙂
