Need some help with PHP includes on category & archive pages

Our support will answer all your general questions here.

Moderator: Rock

Post Reply
xxxtreme
Posts: 2
Joined: Wed Jun 24, 2009 1:47 am

Need some help with PHP includes on category & archive pages

Post by xxxtreme »

I have just installed my first TE copy and am not sure about the exact PHP includes on my Smart Thumbs category and archive pages, in order for all clicks to be counted properly:

From what I can read in the user manual, the PHP include for my main/index page should be:

Code: Select all

<? virtual("/cgi-bin/te/in.cgi?p=default"); ?>
Is that correct?

But then, imagine that the structure for my category pages is http://www.domain.com/category.php and the one for my archive pages is http://www.domain.com/st/archives/archive0.php
What would be the correct PHP inlude for each of these?
Thx in advance
WillWank
Posts: 29
Joined: Fri Apr 24, 2009 3:16 pm
Contact:

Re: Need some help with PHP includes on category & archive pages

Post by WillWank »

xxxtreme wrote:I have just installed my first TE copy and am not sure about the exact PHP includes on my Smart Thumbs category and archive pages, in order for all clicks to be counted properly:

From what I can read in the user manual, the PHP include for my main/index page should be:

Code: Select all

<? virtual("/cgi-bin/te/in.cgi?p=default"); ?>
Is that correct?

But then, imagine that the structure for my category pages is http://www.domain.com/category.php and the one for my archive pages is http://www.domain.com/st/archives/archive0.php
What would be the correct PHP inlude for each of these?
Thx in advance
You can set up pages and use p=whatever_pagename_you_use on each category. Pages can be found in "Options --> Index Pages --> Manage Pages" This will in fact creat a "pseudo te install" for each page you want to track individually, category trading. It increases load on the interface tho.
Image
texpert
Site Admin
Posts: 719
Joined: Sat Mar 14, 2009 5:54 pm

Re: Need some help with PHP includes on category & archive pages

Post by texpert »

xxxtreme wrote:I have just installed my first TE copy and am not sure about the exact PHP includes on my Smart Thumbs category and archive pages, in order for all clicks to be counted properly:

From what I can read in the user manual, the PHP include for my main/index page should be:

Code: Select all

<? virtual("/cgi-bin/te/in.cgi?p=default"); ?>
Is that correct?

But then, imagine that the structure for my category pages is http://www.domain.com/category.php and the one for my archive pages is http://www.domain.com/st/archives/archive0.php
What would be the correct PHP inlude for each of these?
Thx in advance
Hi, please refer to the manual. Topics: "index pages", "index pages / select" and "index pages / manage". Try to understand the difference between basic and advanced pages. If u have many category pages i wouldn't separate statistics for them all, because your database will become large and processing is slower, but everything is covered in the manual. Hope that helps.
xxxtreme
Posts: 2
Joined: Wed Jun 24, 2009 1:47 am

Re: Need some help with PHP includes on category & archive pages

Post by xxxtreme »

Hmm, I have been going thru the part of the user manual indicated by you, but that seems to refer to another issue (at least, so it seems to me).
I do not want to use or display different index/main pages according to the trade.

The question is the following: What happens when some surfer comes e.g. from a Search Engine to my site and goes first to one of my category or archive pages, and later on ends up on my index page (where I have the PHP include). Then the referrer in my stats would NOT be the SE where the surfer came from, but the category or archive page.

I know that e.g. ATX (but also other trade scripts had a special PHP include for archive and category pages.
I think it was something like:

Code: Select all

<?php virtual ("/cgi-bin/atx/in.cgi?mydomain.com"); ?>
axljayangel
Posts: 16
Joined: Wed Jul 01, 2009 6:12 pm

Re: Need some help with PHP includes on category & archive pages

Post by axljayangel »

I'm sorry for the bump but I am wondering the same thing too.

I am using remote tracking because I can't use PHP virtual and the incoming traffic seems to be tracked properly. I have added the default tracking code on all of my pages. I would like to know if I need to do anything special to track incoming traffic on site's subdirectories.

Note that I do not want to show different pages for different traders. Thanks!
"Reality is wrong. Dreams are for real." Tupac Amaru Shakur (June 16th, 1971 - September 13th, 1996)
texpert
Site Admin
Posts: 719
Joined: Sat Mar 14, 2009 5:54 pm

Re: Need some help with PHP includes on category & archive pages

Post by texpert »

xxxtreme wrote:Hmm, I have been going thru the part of the user manual indicated by you, but that seems to refer to another issue (at least, so it seems to me).
I do not want to use or display different index/main pages according to the trade.

The question is the following: What happens when some surfer comes e.g. from a Search Engine to my site and goes first to one of my category or archive pages, and later on ends up on my index page (where I have the PHP include). Then the referrer in my stats would NOT be the SE where the surfer came from, but the category or archive page.

I know that e.g. ATX (but also other trade scripts had a special PHP include for archive and category pages.
I think it was something like:

Code: Select all

<?php virtual ("/cgi-bin/atx/in.cgi?mydomain.com"); ?>
In some scripts you have to mess up with the code and html to achieve that, but in TE you can simply navigate to the "options / general / main" menu and enable "prevent double tracking" option.

regards,
Jim
axljayangel
Posts: 16
Joined: Wed Jul 01, 2009 6:12 pm

Re: Need some help with PHP includes on category & archive pages

Post by axljayangel »

texpert wrote:In some scripts you have to mess up with the code and html to achieve that, but in TE you can simply navigate to the "options / general / main" menu and enable "prevent double tracking" option.

regards,
Jim
So if I add the default incoming traffic include code on all my pages and enable "prevent double tracking" option, the surfers and their clicks shall be saved accordingly to the trader or source (bookmark, SE, etc...) he came from even if he enters my site on a page different from the trading URL set after installation, am I right?
"Reality is wrong. Dreams are for real." Tupac Amaru Shakur (June 16th, 1971 - September 13th, 1996)
texpert
Site Admin
Posts: 719
Joined: Sat Mar 14, 2009 5:54 pm

Re: Need some help with PHP includes on category & archive pages

Post by texpert »

axljayangel wrote:I'm sorry for the bump but I am wondering the same thing too.

I am using remote tracking because I can't use PHP virtual and the incoming traffic seems to be tracked properly. I have added the default tracking code on all of my pages. I would like to know if I need to do anything special to track incoming traffic on site's subdirectories.

Note that I do not want to show different pages for different traders. Thanks!
Even if you're using remote tracking option and your domain is "domain.com", you can install TE on "domain.com" (no need to install it on sub.domain.com).
After u have it installed on your own domain, enable prevent double tracking option in the "options / general / main" menu. And u should be able to place tracking code on your sub pages as well.
texpert
Site Admin
Posts: 719
Joined: Sat Mar 14, 2009 5:54 pm

Re: Need some help with PHP includes on category & archive pages

Post by texpert »

xxxtreme wrote:Hmm, I have been going thru the part of the user manual indicated by you, but that seems to refer to another issue (at least, so it seems to me).
I do not want to use or display different index/main pages according to the trade.

The question is the following: What happens when some surfer comes e.g. from a Search Engine to my site and goes first to one of my category or archive pages, and later on ends up on my index page (where I have the PHP include). Then the referrer in my stats would NOT be the SE where the surfer came from, but the category or archive page.

I know that e.g. ATX (but also other trade scripts had a special PHP include for archive and category pages.
I think it was something like:

Code: Select all

<?php virtual ("/cgi-bin/atx/in.cgi?mydomain.com"); ?>
Simply enable "prevent double tracking" in the "options / general / main" menu and it will prevent changing referer when surfers are switching pages on your site.

Let me know if that helped.
Post Reply