Google gtag

I need help finding a certain code. It’s about the google code that was somehow added to the page. On my website after pressing CTR + U there is a code that I need to delete:

``

window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date()); gtag('config', 'UA-XXXXXXXX-X');

I use Storm PHP, so I started searching for this code in the project using ctr + sfift + f. Unfortunately, it turned out that such a code is only in cache. Of course, I cleaned it manually and with the script, and even generated the theme cache from scratch. Nothing has helped and each time this code shows up in the cache and in the page code, but it is not included in any theme, it is not included in the included scripts, nor is it generated by the plugin. How is that possible?

Hello Tomas,

Try to deactivate plugins and check again, also you can search by ‘%googletagmanager%’ in database.

Hello Odessite,

I found it was inside $theme.additionalJsLibraries

I just overwrote the theme without this variable

{block name=“frontend_index_header_javascript”}
    {if $theme.additionalJsLibraries}
        {$theme.additionalJsLibraries}
    {/if}
{/block}

I do not know where the script was located. It must have been generated somehow because the find tool could not find it.

You cann add custom js in the theme configuration of the backend. This is not stored in files, but in the database.