# Custom patch advice please?

**URL:** <https://forum.mautic.org/t/custom-patch-advice-please/22403>\
**Category:** Development\
**Created:** [January 20, 2022, 11:23am UTC](https://forum.mautic.org/t/custom-patch-advice-please/22403 "2022-01-20T11:23:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivan006](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ivan006/32/6379_2.png) [@ivan006](https://forum.mautic.org/u/ivan006)\
**Post date:** [January 20, 2022, 11:23am UTC](https://forum.mautic.org/t/custom-patch-advice-please/22403/1 "2022-01-20T11:23:57Z")

</div>

I want advice on implimenting my Mautic patch please. So I edited “app\bundles\PageBundle\Model\PageModel.php” and changed something in the “hitPage(” function i commented out the “return” in this operation

```auto

        // Don't skew results with user hits
        if (!$this->security->isAnonymous()) {
            // return;
        }

```

So the reason i did that was because I am implimenting that function in a custom api endpoint i made and since the api agent is considered a logged in user the function will be aborted because of the above logic and return operation.  
The reason I have exposed this function in an endpoint is because i want to track external event data (as well as internal events)/
