Any ideas as to why my track_views is showing 2 views for every 1 view?
TIA
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
February 08, 2011 2:03pm
Subscribe [6]#1 / Feb 08, 2011 2:03pm
Any ideas as to why my track_views is showing 2 views for every 1 view?
TIA
#2 / Feb 08, 2011 5:09pm
Hi, Eastwood Design.
How many templates are you using this code on?
#3 / Feb 08, 2011 5:18pm
just the one template
I have this on the details template where the tracking happens:
{exp:weblog:entries weblog="sermons" orderby="date" sort="desc" limit="1" dynamic="yes" track_views="one" disable="member_data|trackbacks"}{title} <a href="http://{exp:linklocker">Download</a>{/exp:weblog:entries}and then on another template I have:
{exp:weblog:entries sort="desc" limit="3" orderby="view_count_one" weblog="sermons" dynamic="off" show_expired="no" show_future_entries="yes" disable="trackbacks"}
<a href="http://{title_permalink={my_template_group}/sermon_detail}">{title}</a>
{sermon_speaker}
{entry_date format="%M %d - %Y"}
({view_count_one} views)
{/exp:weblog:entries}If I view the details page once and go back to view the other page the tracking increases by 2 each time
#4 / Feb 09, 2011 2:07am
Eastwood Design,
What does the URL to your detail page look like?
Are you using any caching?
If you add the following to your config.php file does it solve the issue?
$config['relaxed_track_views'] = 'y';#5 / Jun 07, 2011 9:27am
So, I have identical problem and adding
$config['relaxed_track_views'] = 'y';to config.php doesn’t solve it :(
After I refreshed single-post page the counter doubled amount of views.
#6 / Jun 07, 2011 9:34am
Check your page to make sure you don’t have any links to images, css files, javascript files etc… which don’t lead to a correct file. If you have any of those then this will create this kind of behaviour.
Do you have a link to the page in question?
Best wishes,
Mark
#7 / Jun 07, 2011 9:46am
thank you for reply 😊
so, I don’t think there are any bad links. But I’m not sure 100%. It all worked correctly a few days ago. I mean view-counter. And yesterday I found out the doubling counts.
You can make sure about the problem on this (or any other single-post) page:
http://agoro.ru/sell/note/65
It’s in russian. The counter (gray color) is located in right-bottom corner after main text of publication.
#8 / Jun 07, 2011 9:51am
I’m not too sure what this link is for but you have :
which shows as not loading. Not too sure what it is but it might be the cause.
I personally would try with severely stripped back templates which just have the weblog tags in them and no styling, nothing else and see if you still have the problem. If not then you can start adding things back in again until you see it starts misbehaving again. You should then have your culprit.
I’d definitely check out what that link above is first though.
Hope that helps a bit.
Best wishes,
Mark
#9 / Jun 07, 2011 9:53am
Actually looking at the page again I’m now getting this link - http://s11.radikal.ru/i184/1105/4e/0ad8db879386.jpg showing up as sometimes loading and sometimes not. Is that server having a problem maybe?
Also when it does load I don’t see it anywhere on the page.
Best wishes,
Mark
#10 / Jun 07, 2011 9:57am
Thank you, Mark 😊
yeah, it’s good idea to strip the code of the page. I’ll try it in the evening.
But where did you find that link? I don’t see it in source code of the page.
#11 / Jun 07, 2011 10:01am
Thank you, Mark 😊
yeah, it’s good idea to strip the code of the page. I’ll try it in the evening.
But where did you find that link? I don’t see it in source code of the page.
Actually it looks like you’ve just found the problem yourself 😉
The link to the image is in the source code. Take a look and you’ll see that you have a } brace showing in the image code. I’d check your templates as there will definitely be something in there which is causing this. This will also be causing your double views problem too.
Best wishes,
Mark
P.S. As for the csi.gstatic.com link that showed up as loading when I used FireFox and FireBug. From reading on the internet I believe it is owned by Google and used to serve up static content such as images etc…
#12 / Jun 07, 2011 10:06am
I just noticed that you also have an iframe on that page too. Not sure if that might cause this kind of thing to happen too maybe?
Best wishes,
Mark
#13 / Jun 07, 2011 10:06am
Actually looking at the page again I’m now getting this link - http://s11.radikal.ru/i184/1105/4e/0ad8db879386.jpg showing up as sometimes loading and sometimes not. Is that server having a problem maybe?
Also when it does load I don’t see it anywhere on the page.
Best wishes,
Mark
I think it’s ok. It’s one of the russian image hostings and yeah, it sometimes load hardly. However the problem is not in it. You make sure opening other pages without any links to images.
For example this:
http://agoro.ru/sell/note/70
p.s. I have a idea and maybe you are right, Mark. It might be bad link. Actually it’s not clearly single-post page. I mean there are posts in middle column which are loaded too and maybe there are bad links.
So, the best way is to try to strip the code as you have said.
Thank you again. And I will write about that in several hours.
#14 / Jun 07, 2011 12:31pm
the problem was in middle column in which there are loaded posts with (may be) incorrect links or something else.
Thank you, Mark 😊
#15 / Jun 07, 2011 12:57pm
the problem was in middle column in which there are loaded posts with (may be) incorrect links or something else.
Thank you, Mark 😊
No problem at all. Glad that got you all sorted.
Best wishes,
Mark