• Priority: 0
  • Status: Closed
  • Theme: Alysum
  • Assigned To: Fred
  • Private: No
  • Open Date: 26.01.24, 23:44
  • Opened by: Marc Berthold
  • Closed by: Anonymous Submitter
  • Closed on:
  • Reason: Not a bug

Ticket #25251 - Google Analytics

Hi,

I am struggling getting data from Google Analytics. I have added the GA tracking code to the AMP module, and it works just fine. I receive live data when someone is on the website.
However, even after installing the GA module for Prestashop and adding the tracking code, I don’t get any data from desktop users.

Any idea?

Best regards,

Comments

Fred 27 Jan 2024, 09:21

Hi, Marc.
Google Analytics is not our module, so I can't suggest what could be wrong there.
But I can advice you to install GA Debugger, that might help you to figure out the reason of problem https://chromewebstore.google.com/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna

Marc Berthold 27 Jan 2024, 12:31

Hi Fred,

I have the feeling there is an error within the theme of the desktop website.
I am not an expert so I don't understand but these errors come up in the console and I don't know how to fix them.

Uncaught TypeError: r.slick is not a function

  at a (scripts.min.js:1:558)
  at s (frontend.min.js?v=2.9.14.9.8:5:46277)
  at Object.doAction (frontend.min.js?v=2.9.14.9.8:5:46792)
  at e.exports.runReadyTrigger (frontend.min.js?v=2.9.14.9.8:5:90993)
  at HTMLDivElement.<anonymous> (frontend.min.js?v=2.9.14.9.8:5:68707)
  at Function.each (core.js:37:2944)
  at e.fn.init.each (core.js:37:1423)
  at n.value (frontend.min.js?v=2.9.14.9.8:5:68654)
  at n.value (frontend.min.js?v=2.9.14.9.8:5:69086)
  at n.trigger (frontend-modules.min.js?v=2.9.14.9.8:5:46869)

Failed to load resource: the server responded with a status of 404 ()

Uncaught SyntaxError: Unexpected token ')'

I have the feeling that these errors are causing the GA script not to launch.

Thanks a lot of your help.
Best regards,

Fred 27 Jan 2024, 17:08

The error is fixed. Please check GA

Marc Berthold 27 Jan 2024, 18:10

Thank you,
Unfortunately, GA is still not working on desktop, only on AMP
There are still 2 errors in the console but dunno if that affects it

Fred 27 Jan 2024, 18:27

AMP is completely independent part.
Please try debugger

Marc Berthold 29 Jan 2024, 14:11

Thank you,
Unfortunately, GA is still not working on desktop, only on AMP
There are still 2 errors in the console but dunno if that affects it

Marc Berthold 29 Jan 2024, 14:12

Is it possible to manually add the GA tracking code in the head of the pages?
If yes, where is the file located?

Thanks in advance

Fred 30 Jan 2024, 10:34

You can add it to the footer.tpl file in /themes/alysum/templates/_partials

Marc Berthold 30 Jan 2024, 11:34

It doesn't work. Wherever I try to place it in this file, I cannot access the website anymore and get error 500

Marc Berthold 30 Jan 2024, 11:51

It's like the script doesn't want to load for some reason. Could there be a javascript issue?

When I open the console, I still see this error for example:
content.js:16 Uncaught SyntaxError: Unexpected token ')' (at content.js:16:41)

Fred 30 Jan 2024, 14:00

Where is that content.js file cones from? There is no such file in our theme