/analytics/community?hl=en
This content is likely not relevant anymore. Try searching or browse recent questions.
-
A subdirectory (a folder in my root) just isn't logging views. 1 Recommended Answer 14 Replies 2 Upvotes
1 Recommended Answer
$0 Recommended Answers
So I recently had to move my project into a /wiki/ folder so that a forum software could make use of /root.

Since then, I've lost google analytics tracking, I've just added the google analytics script into the forum software which provides my root index.js with the tracking code and it works for all directories and subdirectories except my /wiki


I've spent ages trying to figure it out, even creating a new property and explicitly giving it the /wiki/ url, would appreciate any help on this.

I should mention that everything within my /wiki/ folder is custom coded and its a gatsby content site. whereas the root is just a forum software.
All Replies (14)
Hi,

Reviewed Google Analytics tracking, it seems that the Google Analytics tracking code is not installed properly. There have syntax issue in the code due to that Pageview hits are not being generated.


I would suggest to add GA tracking code manually in the <head> section of every page.

Thanks!
marked this as an answer
-
Oh, wow. I would of never of noticed that, I've added in some configuration to the plugin that generates the analytic code on each page and it now appears in the header (including the script)

it seems to work for the /video tab, however, would you be able to run that tool against 


or any seed/resource post as those views still aren't being counted and im not sure why

*EDIT

- Update, seems like no links under /wiki work. I believe this is the issue, https://support.google.com/tagassistant/answer/3059154#http_response

but not sure on the fix.
marked this as an answer
-
Anyone else able to help on this?
marked this as an answer
Hi :-)

your main site pages are using global site tag gtag.js (which is fine)

Im seeing the same for the wiki pages too, however the source code indicates analytics.js is running (which is fine)
<link rel="preconnect dns-prefetch" href="https://www.google-analytics.com"/>
<script>
  if(true) {
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  }
  if (typeof ga === "function") {
    ga('create', 'UA-132840376-3', 'auto', {});
      }
</script>

however there also seems to be an incomplete gtag.js version of the code for the same GA Property 
<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-132840376-3"></script>

Having two lots of tracking for same property within the same page(s).. and/or mixed versions of tracking code for same property within same page(s) can lead to faulty or no data.

screenshot from source code
marked this as an answer
Thanks :-)
awesome to know you got it sorted out!
*does a happy dance around my desk for you* :-))
marked this as an answer
This question is locked and replying has been disabled.
Discard post? You will lose what you have written so far.
Write a reply
10 characters required
Failed to attach file, click here to try again.
Discard post?
You will lose what you have written so far.
Personal information found

We found the following personal information in your message:

This information will be visible to anyone who visits or subscribes to notifications for this post. Are you sure you want to continue?

A problem occurred. Please try again.
Create Reply
Edit Reply
Delete post?
This will remove the reply from the Answers section.
Notifications are off
Your notifications are currently off and you won't receive subscription updates. To turn them on, go to Notifications preferences on your Profile page.
Report abuse
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
Report post
What type of post are you reporting?
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
This reply is no longer available.
/analytics/threads
//accounts.google.com/ServiceLogin
You'll receive email notifications for new posts at
Unable to delete question.
Unable to update vote.
Unable to update subscription.
You have been unsubscribed
Deleted
Unable to delete reply.
Removed from Answers
Marked as Recommended Answer
Removed recommendation
Undo
Unable to update reply.
Unable to update vote.
Thank you. Your response was recorded.
Unable to undo vote.
Thank you. This reply will now display in the answers section.
Link copied
Locked
Unlocked
Unable to lock
Unable to unlock
Pinned
Unpinned
Unable to pin
Unable to unpin
Marked
Unmarked
Unable to mark
Reported as off topic
/analytics/profile/0?hl=it