0

I am using magento2.3.5-p2 Community Edition

I am having a problem on finding the location of certain code,

I have tried templatehints, search using grep and find all contents in file but to no avail the code still not able to be find

The code below, the highlighted one is the one I am trying to find the location of that

enter image description here

When I inspect element the page, the code is not hovering to any element, the nearest element is the footer but I am unsure, do take a look at image below

enter image description here

enter image description here

When I hover into the

<div class="debugging-hints" that is which is the nearest to the <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-GE2HRWD" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> only then I will get the source file which is at

/var/www/html/myecommerceproject/app/code/MageBig/QuickView/view/frontend/templates/quickview.popup.phtml

but even then. When I check on the source code for the intended script I want to find it does not exists, It must be somewhere in the configuration of Magento admin panel, but I am not sure where

Any help is kindly appreciated, thank you

2 Answers 2

1

Simply you can use grep command for search in file through SSH

grep -l -r "your string" foldername/

e.g grep -l -r "www.googletagmanager.com/" vendor/magento

e.g grep -l -r "www.googletagmanager.com/" app/

2
  • Hi, i have searched and there is no file which contains text of 'googletagmanager' or related to it, I think this value are not coming from the source code Commented Jan 6, 2022 at 8:17
  • I think it's must be coming from source code but if not then please search in database too Commented Jan 6, 2022 at 8:32
0

within magento root folder, do a

grep -R '<!-- GOOGLE TAG MANAGER -->' vendor/magento/module-*

and you can look at all the templates using this code

6
  • Hi, i have searched and there is no file which contains text of 'googletagmanager' or related to it, I think this value are not coming from the source code Commented Jan 6, 2022 at 8:18
  • You ok community version or enterprise ?
    – rex
    Commented Jan 9, 2022 at 9:16
  • Look for ga.phtml file in vendor
    – rex
    Commented Jan 9, 2022 at 9:16
  • I am using community edition Commented Jan 10, 2022 at 1:50
  • owh finally found some trace of google api here, but its google analytics vendor/magento/module-google-analytics/view/frontend/layout/default.xml Commented Jan 10, 2022 at 1:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.