Go Back   WarriorForum - Internet Marketing Forums > The Warrior Forum > Main Internet Marketing Discussion Forum
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 06-17-2009, 05:33 AM   #1
HyperActive Warrior
War Room Member
 
forfun_cash's Avatar
 
Join Date: Apr 2008
Location: Singapore
Posts: 302
Thanks: 38
Thanked 12 Times in 10 Posts
Social Networking View Member's Twitter Profile  View Member's YouTube Profile
Default How to add google analytical code inside a domain that has no webpage?

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.
forfun_cash is offline   Reply With Quote
Old 06-17-2009, 05:37 AM   #2
Dare To Be Different
War Room Member
 
ExRat's Avatar
 
Join Date: Nov 2005
Location: U.K.
Posts: 8,878
Thanks: 1,318
Thanked 2,807 Times in 1,041 Posts
Default Re: How to add google analytical code inside a domain that has no webpage?

Hi,

Quote:
they require me to add a code to my webpage which i do not have at all
Quote:
Create a file called myaffprogram.php
The file 'myaffprogram.php' is the webpage that you need to add the GA code to.

I can't guarantee it will work, I've never tried adding google analytics to a redirect page.

ExRat is offline   Reply With Quote
Old 06-17-2009, 08:16 AM   #3
Took The Red Pill
War Room Member
 
xiaophil's Avatar
 
Join Date: Apr 2006
Location: Here and Now
Posts: 374
Thanks: 124
Thanked 106 Times in 64 Posts
Contact Info
Send a message via Skype™ to xiaophil
Default Re: How to add google analytical code inside a domain that has no webpage?

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.
xiaophil is offline   Reply With Quote
Old 06-17-2009, 08:34 AM   #4
HyperActive Warrior
 
Harry Behrens's Avatar
 
Join Date: Jan 2006
Location: Caracas, Venezuela
Posts: 306
Thanks: 118
Thanked 167 Times in 69 Posts
Contact Info
Send a message via MSN to Harry Behrens Send a message via Skype™ to Harry Behrens
Default Re: How to add google analytical code inside a domain that has no webpage?

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:
<script type="text/javascript">
<!--
window.location = "http://www.google.com/"
//-->
</script>
You can read more about it here (no affiliation): Javascript Tutorial - Redirect

Im fairly sure this would work, however, in full disclosure I have not tried it myself first-hand... worth a shot though

- Harry Behrens
Harry Behrens is offline   Reply With Quote
Old 06-17-2009, 08:42 AM   #5
Dare To Be Different
War Room Member
 
ExRat's Avatar
 
Join Date: Nov 2005
Location: U.K.
Posts: 8,878
Thanks: 1,318
Thanked 2,807 Times in 1,041 Posts
Default Re: How to add google analytical code inside a domain that has no webpage?

Hi hmbehrens,

Quote:
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.
I thought that would be the case. Bearing in mind all of the javascript issues this might create and possible lost commissions, depending on what exactly the OP wants to achieve, wouldn't it be better just to use a typical, stat-producing redirect script?

ExRat is offline   Reply With Quote
Old 06-17-2009, 08:48 AM   #6
HyperActive Warrior
 
Harry Behrens's Avatar
 
Join Date: Jan 2006
Location: Caracas, Venezuela
Posts: 306
Thanks: 118
Thanked 167 Times in 69 Posts
Contact Info
Send a message via MSN to Harry Behrens Send a message via Skype™ to Harry Behrens
Default Re: How to add google analytical code inside a domain that has no webpage?

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
Harry Behrens is offline   Reply With Quote
Old 06-18-2009, 08:16 AM   #7
Kevin Kelly
War Room Member
 
Join Date: Jun 2009
Posts: 574
Thanks: 78
Thanked 74 Times in 60 Posts
Default Re: How to add google analytical code inside a domain that has no webpage?

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.
OnlineMarketingSys is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > The Warrior Forum > Main Internet Marketing Discussion Forum

Tags
add, analytical, code, domain, google, inside, webpage

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 12:07 AM.