Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
JMM
Experienced
Topic Author
Posts: 154
Joined: 02 Aug 2021, 11:18

Embedding script in footer

28 Jan 2022, 18:38

Hello again, Karl.

I have no idea if it will work, but I have embedded some script in my footer:

Code
<script type="text/javascript" src="https://www.jenjo.family/content/custom/files/jmm/phpwebstat/pws.php?mode=js"></script>

<noscript><img src="https://www.jenjo.family/content/custom/files/jmm/phpwebstat/pws.php?mode=img" style="border:0; width:1px; height:1px" alt="noscript-img"></noscript>
Unfortunately, it doesn't seem to be working, as nothing is being logged (captured).

By looking at the above code, do you see any reason why it should not work?

Thank you in advance & have a great day.

Regards,
John
Location: Burlington (Toronto-ish), Ontario, Canada
Self-hosted using Abyss Web Server:   AuroraWings.me   |   GalleryWings.com   |   PanAurora-Studio.com   |
Externally-hosted using LiteSpeed/Apache Web Server:   GenealogyWings.com/galleries   |
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Embedding script in footer

28 Jan 2022, 23:24

The PHP you have above loads correctly, but then that PHP tries to load another path which is wrong 404:
https://www.jenjo.family/stat/pws.php

See screenshot:
Image

For it to work, the path would have to be corrected. Also, I should mention that it's likely this statisitics script will only track/count visitors on their entry point, and not while traversing pages. X3 is technically a SPA (single-page application), and that's why pages load fast when you navigate from the menu. This also means that stats will only trigger from the first page load, but not when navigating pages. Code would have to be modified.
 
User avatar
JMM
Experienced
Topic Author
Posts: 154
Joined: 02 Aug 2021, 11:18

Re: Embedding script in footer

30 Jan 2022, 06:50

All is good with the script now, Karl, since you pointed out to me the problem with the incorrect subfolder.

Thanks again for your help.
Location: Burlington (Toronto-ish), Ontario, Canada
Self-hosted using Abyss Web Server:   AuroraWings.me   |   GalleryWings.com   |   PanAurora-Studio.com   |
Externally-hosted using LiteSpeed/Apache Web Server:   GenealogyWings.com/galleries   |