![]() | | ||||||||
| | #1 |
| HyperActive Warrior War Room Member Join Date: Apr 2008 Location: Singapore
Posts: 302
Thanks: 38
Thanked 12 Times in 10 Posts
|
I did the steps below as advised by a fellow warrior, creating php file, adding link (shown below). But when i entered google analytics, they require me to add a code to my webpage which i do not have at all. Any warriors can advice me? Regards. Here is how I create a PHP redirect: 1) Create a file called myaffprogram.php where myaffprogram is the name of the product or program you want to promote. 2) Copy and paste the following code into it: Code: <?php header("Location:http://www.yourafflink.com"); exit(); ?> 3) Replace the link with your affiliate program ID. 4) Upload the file to your host and the link will be yourdomain.com/myaffprogram.php Every time someone clicks on this it will show up in your stats. |
| | |
| | #2 | ||
| Dare To Be Different War Room Member Join Date: Nov 2005 Location: U.K.
Posts: 8,878
Thanks: 1,318
Thanked 2,807 Times in 1,041 Posts
|
Hi, Quote:
Quote:
I can't guarantee it will work, I've never tried adding google analytics to a redirect page. | ||
| | |||
| | |
| | #3 |
| Took The Red Pill War Room Member Join Date: Apr 2006 Location: Here and Now
Posts: 374
Thanks: 124
Thanked 106 Times in 64 Posts
|
When they said "it will show up in your stats", I think they meant the log files on your host, not Google Analytics. Most hosting companies provide a way to view your logs in a friendly way from the control panel, take a look. I've never tried G.Analytics with a php redirect either. If it doesn't work then you could try a blank html page with an http meta-refresh. |
| | |
| | #4 | |
| HyperActive Warrior Join Date: Jan 2006 Location: Caracas, Venezuela
Posts: 306
Thanks: 118
Thanked 167 Times in 69 Posts
|
When using a PHP redirect Analytics will not track because the PHP fires first, and doesn't give any time for the Google Analytics code to activate. You would need to use a javascript redirect that is placed below the Analytics code: Quote:
Im fairly sure this would work, however, in full disclosure I have not tried it myself first-hand... worth a shot though | |
|
- Harry Behrens
| ||
| | |
| | #5 | |
| Dare To Be Different War Room Member Join Date: Nov 2005 Location: U.K.
Posts: 8,878
Thanks: 1,318
Thanked 2,807 Times in 1,041 Posts
|
Hi hmbehrens, Quote:
| |
| | ||
| | |
| | #6 |
| HyperActive Warrior Join Date: Jan 2006 Location: Caracas, Venezuela
Posts: 306
Thanks: 118
Thanked 167 Times in 69 Posts
|
Yep it'll cause the usual javascript stuff like if the browser has its javascript disabled, the redirect won't happen and the browser will just stay frozen on the empty page. When talking of conversions and sales that can definitely be a deal-breaker. I'm assuming we're talking about a domain that's entirely redirected with a single page (like for example to get around ezinearticles.com linking restrictions or something like that) so that's the only solution I can think of aside from, like you suggest, using an actual stats and redirection script and cutting out Analytics entirely... I don't have much experience with those scripts though so I can't recommend any. |
|
- Harry Behrens
| |
| | |
| | #7 |
| Kevin Kelly War Room Member Join Date: Jun 2009
Posts: 574
Thanks: 78
Thanked 74 Times in 60 Posts
|
I would just use the analytics software within Cpanel or if you require something more powerful, there are off the shelf software packages that you can install on your host (if you have root access), that will provide you similar results like analytics.
|
| | |
![]() |
|
| Tags |
| add, analytical, code, domain, google, inside, webpage |
| Thread Tools | |
| |
![]() |