<p>From my testing it appears that this is an issue with Google's universal analytics.</p>

<p>Based off of Clive's recommendation, my solution what to change</p>

<pre><code>  ga('send', 'page view');
</code></pre>

<p>to</p>

<pre><code>  ga('send', 'pageview', {
   'page': '/{{entry.slug}}',
   'title': '{{entry.title}}'
  });
</code></pre>

<p>This seems to be holding up well.</p>

CC BY-SA 3.0
2015-01-09T15:16:24.983Z
2015-01-09T15:16:24.983Z
David A McInnis
<p>If your Craft templates folder is above the document root and not public, it couldn't be "real" traffic. Could be residuals left over from testing somehow (like a live preview or test domain or what not.) Not sure I'd worry about it unless they keep increasing?</p>

<p>I did notice you have 2 tracking codes installed... there's one in the head and one in the footer (cranberryburst.com). Could be wrecking havoc?</p>

CC BY-SA 3.0
2015-01-08T01:29:28.597Z
Yes, my craft folder is above my public folder and not accessible from the web. I have removed the second tracking code and will continue to monitor.
David A McInnis
CC BY-SA 3.0
2015-01-08T01:06:41.130Z
2015-01-08T01:06:41.130Z
RitterKnight
<p>This is very odd to me. I am using this in my templates.</p>

<pre><code>{% extends "_layoutGist.html" %}
</code></pre>

<p>My layout is showing up in my Google Analytics. GA is showing showing traffic to</p>

<pre><code>/craft/templates/_layoutGist.html
</code></pre>

<p>This seams very peculiar as I would think the file would be fully rendered before Google got ahold of it. Is my tracking code in the wrong place?</p>

<p><img src="https://i.sstatic.net/ExbtT.png" alt="enter image description here"></p>

CC BY-SA 3.0
2015-01-07T12:24:37.957Z
Any chance you can send a link?
Clive Portman
CC BY-SA 3.0
2015-01-07T19:38:22.817Z
Actually, now that I look at it all of my includes are showing up in Google Analytics. This seems incorrect.  Here is a URL to examine if you need one. http://cranberry.com/news-marketing/about There are several includes in here. One that extends layout.html, one that includes header.html, footer.html and a snippet that pulls in Google Analytics tracking code.
David A McInnis
CC BY-SA 3.0
2015-01-07T23:27:29.763Z
Looks right to me. Google should just be using the request URLs. Can you post a screenshot of what GA is showing?
Brandon Kelly
CC BY-SA 3.0
2015-01-08T10:51:26.577Z
For GA to track these views either the GA tracking code needs to be fired in the browser from those URLS or you're manually sending page hits using something like this:

 ga('send', {
   'hitType': 'pageview',
   'page': '/craft/templates/_layout.html'
 });
Either that or there's some server-side implementation going on?
Clive Portman
CC BY-SA 3.0
2015-01-08T22:51:35.600Z
What happens if you instead place your GA tracking code in your layout template?
Clive Portman
CC BY-SA 3.0
2015-01-09T01:24:59.657Z
Update, I added  'page': '/{{entry.slug}}',
 'title': '{{entry.title}}' to my tracking code. I will let you know if this works.
David A McInnis
<templating>
Why are my template filenames showing up in Google Analytics
# Why are my template filenames showing up in Google Analytics

(Asked by: username_0 on 2015-01-07)

This is very odd to me. I am using this in my templates.
{% extends "_layoutGist.html" %}

My layout is showing up in my Google Analytics. GA is showing showing traffic to
/craft/templates/_layoutGist.html

This seams very peculiar as I would think the file would be fully rendered before Google got ahold of it. Is my tracking code in the wrong place?

**Tags:** templating

> **Comments:**
> **username_1**: Any chance you can send a link?  
> **username_0**: Actually, now that I look at it all of my includes are showing up in Google Analytics. This seems incorrect.  Here is a URL to examine if you need one. http://cranberry.com/news-marketing/about There are several includes in here. One that extends layout.html, one that includes header.html, footer.html and a snippet that pulls in Google Analytics tracking code.  
> **username_2**: Looks right to me. Google should just be using the request URLs. Can you post a screenshot of what GA is showing?  
> **username_1**: For GA to track these views either the GA tracking code needs to be fired in the browser from those URLS or you're manually sending page hits using something like this:   ga('send', {    'hitType': 'pageview',    'page': '/craft/templates/_layout.html'  }); Either that or there's some server-side implementation going on?  
> **username_1**: What happens if you instead place your GA tracking code in your layout template?  
> **username_0**: Update, I added  'page': '/{{entry.slug}}',  'title': '{{entry.title}}' to my tracking code. I will let you know if this works.  

---

## 2 answers

### Answer by username_0 on 2015-01-09. Score: 3 | Accepted answer

From my testing it appears that this is an issue with Google's universal analytics.
Based off of Clive's recommendation, my solution what to change
  ga('send', 'page view');

to
  ga('send', 'pageview', {
   'page': '/{{entry.slug}}',
   'title': '{{entry.title}}'
  });

This seems to be holding up well.


---

### Answer by username_3 on 2015-01-08. Score: 2

If your Craft templates folder is above the document root and not public, it couldn't be "real" traffic. Could be residuals left over from testing somehow (like a live preview or test domain or what not.) Not sure I'd worry about it unless they keep increasing?

I did notice you have 2 tracking codes installed... there's one in the head and one in the footer (cranberryburst.com). Could be wrecking havoc?

> **Comments:**
> **username_0**: Yes, my craft folder is above my public folder and not accessible from the web. I have removed the second tracking code and will continue to monitor.  

---

