• Closed by: Anonymous Submitter
  • Closed on:
  • Reason: Not a bug

Ticket #20269 - Where I can add google tag manager?

What file can I add the Google Manager code? I try footer.tpl, but this generate errors.

Second question:

How i can change order column in mobile category? Now in mobile I see list category and products. I want see first products.

Comments

Fred 21 Dec 2020, 13:59

Hi, Damian.
You don’t have to add it into the code.
Use the Google Analytics module

Damian Stefanski 21 Dec 2020, 14:02

Hi,

Google Analytics module don’t work with new Google Analytics 4 (generate Google Tag Manager code). I cant register old GA. I must add this to template code.

How I can revers colums in mobile view?

Fred 21 Dec 2020, 14:05

Yes, I see.
Give me Google Analytics code you need to add to the theme

Damian Stefanski 21 Dec 2020, 16:56
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Y41DKR74RE"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-Y41DKR74RE');
</script>

Will the changes be saved when I update the theme? Where the code will be added?

In the future you could add to the template the ability to attach files for head and body.

Fred 22 Dec 2020, 11:28

No, just keep a backup of that file