Prosper202 Tracking202 Export202 WorldProxy202 Meetup202 | Blog Forum Newsletter Twitter | Advertise
Login · Register
Home About Docs Scripts Blog Forums Hosting Donate Download

Javacode resets subid whenever loaded

Post new topic Reply to topic Prosper202 Forum Index » Prosper202 Self-Hosted-Apps
New Posts Search Forum
Author Message
Aeris
Website


Joined: Mar 19th, 2008
Posts: 95

Post Posted: Aug 14th, 2008 at 1:12pm Post subject: JavaScript Resets Value when Loaded | Possible Tracking Problem Reply with quote

Hey Wes, I just wanted to ask something.

I am running a landing page that has navagation, with a home page, videos page, more information, etc.

I have the needed javescript on the home page, but there are some people that will click and go back to the home page a few times to review the content before they click for the free trial and are redirected to the offer.

I was wondering, how does this affect tracking? Does 202 know it's the same person, just going back between a few pages before they want to be redirected?

Since 202 collects information per subid, I was wondering, everytime the javasceipt is loaded, it will replacs the 'tracking202subid' value and the 'tracking202outbound' value when loaded each time.

I was worried information is lost about the user since the new subid won't home the proper information regarding the conversion if one is made.

Back to top
T202Wes
Website Email Twitter Facebook AIM


Joined: Oct 20th, 2007
Posts: 2432

Post Posted: Aug 14th, 2008 at 5:47pm Post subject: Re: Javacode resets subid whenever loaded Reply with quote

Sure yeah that will screw it up, if you want you can code something in your php script that says, only load the JS again, if a cookie IS NOT SET.

It'd look something like this

Quote:

<?

if ($_COOKIE['tracking202subid'] == '') {

//if cookie is blank, run the js code again

?><script type="javascript">blahblahlbah<?

} else {

//else if it is already set, do nothing

}

?>

Back to top
Aeris
Website


Joined: Mar 19th, 2008
Posts: 95

Post Posted: Aug 16th, 2008 at 4:05am Post subject: Re: Javacode resets subid whenever loaded Reply with quote

T202Wes wrote:
Sure yeah that will screw it up, if you want you can code something in your php script that says, only load the JS again, if a cookie IS NOT SET.

It'd look something like this

Quote:

<?

if ($_COOKIE['tracking202subid'] == '') {

//if cookie is blank, run the js code again

?><script type="javascript">blahblahlbah<?

} else {

//else if it is already set, do nothing

}

?>

Would I be able to just add that snippet my 'landing page' to get rid of this possible error?

Back to top
T202Wes
Website Email Twitter Facebook AIM


Joined: Oct 20th, 2007
Posts: 2432

Post Posted: Aug 16th, 2008 at 2:25pm Post subject: Re: Javacode resets subid whenever loaded Reply with quote

absolutely, just make sure to replace the JS code in the example with your real JS code!

Back to top
Aeris
Website


Joined: Mar 19th, 2008
Posts: 95

Post Posted: Aug 16th, 2008 at 2:44pm Post subject: Re: Javacode resets subid whenever loaded Reply with quote

T202Wes wrote:
absolutely, just make sure to replace the JS code in the example with your real JS code!

<?

if ($_COOKIE['tracking202subid'] == '') {

//if cookie is blank, run the JS code again

?><script src="http://tracking.net/tracking202/static/landing.php?lpip=789" type="text/javascript"></script>

<?

} else {

//else if it is already set, do nothing

}

?>

Doesn't seem to prevent the JS from being fired again.

Back to top
T202Wes
Website Email Twitter Facebook AIM


Joined: Oct 20th, 2007
Posts: 2432

Post Posted: Aug 16th, 2008 at 8:20pm Post subject: Re: Javacode resets subid whenever loaded Reply with quote

Everytime you refresh it keeps firing?

what if you change

if ($_COOKIE['tracking202subid'] == '') {

to

if (!isset($_COOKIE['tracking202subid'])) {

Back to top
Aeris
Website


Joined: Mar 19th, 2008
Posts: 95

Post Posted: Aug 17th, 2008 at 4:34pm Post subject: Re: Javacode resets subid whenever loaded Reply with quote

T202Wes wrote:
Everytime you refresh it keeps firing?

what if you change

if ($_COOKIE['tracking202subid'] == '') {

to

if (!isset($_COOKIE['tracking202subid'])) {

I am still having some problems.

Back to top
T202Wes
Website Email Twitter Facebook AIM


Joined: Oct 20th, 2007
Posts: 2432

Post Posted: Aug 18th, 2008 at 12:54am Post subject: Re: Javacode resets subid whenever loaded Reply with quote

works for me,

are u sure the html is formed right, this is what I tested it with.

Quote:
<html>

<body>

<?

if (!isset($_COOKIE['tracking202subid'])) {

?>show js<script src="http://static.tracking202.com/lp/xxxxx/landing.js" type="text/javascript"></script><? }

else { ?> js is set already<? } ?>

</body>

Back to top
Aeris
Website


Joined: Mar 19th, 2008
Posts: 95

Post Posted: Aug 18th, 2008 at 6:29am Post subject: Re: Javacode resets subid whenever loaded Reply with quote

T202Wes wrote:
works for me,

are u sure the html is formed right, this is what I tested it with.

Quote:
<html>

<body>

<?

if (!isset($_COOKIE['tracking202subid'])) {

?>show js<script src="http://static.tracking202.com/lp/xxxxx/landing.js" type="text/javascript"></script><? }

else { ?> js is set already<? } ?>

</body>

Thanks! Works great!

I was placing the code on my wrong index pages!

Back to top
prosumer86
Website Facebook MSN AIM


Joined: Nov 19th, 2007
Posts: 17

Post Posted: Aug 19th, 2008 at 12:30am Post subject: Re: Javacode resets subid whenever loaded Reply with quote

Does it matter if my index pages are .html or .php? Will this affect those subids in any way? Just wondering

Back to top
prosumer86
Website Facebook MSN AIM


Joined: Nov 19th, 2007
Posts: 17

Post Posted: Aug 19th, 2008 at 12:37am Post subject: Re: Javacode resets subid whenever loaded Reply with quote

Also, I'm seeing the text "show js js is set already " on my index pages. Not like this matters, if it is already working properly, just thought I'd raise this up.

Back to top
202
Email


Joined: Dec 4th, 2007
Posts: 1190

Post Posted: Aug 19th, 2008 at 1:44am Post subject: Re: Javacode resets subid whenever loaded Reply with quote

It should be in .php format since your landing pages will be having the outbound php code to send visitors from your LP to offer page. If it's in html format, it's possible the code could be all broken.

Back to top
Aeris
Website


Joined: Mar 19th, 2008
Posts: 95

Post Posted: Aug 19th, 2008 at 2:31pm Post subject: Re: Javacode resets subid whenever loaded Reply with quote

prosumer86 wrote:
Also, I'm seeing the text "show js js is set already " on my index pages. Not like this matters, if it is already working properly, just thought I'd raise this up.

Yes, it does that.

I just replaced the text with a "!" and "." and placed the code at the end of some of my copy sentence. Lol.

Back to top
T202Wes
Website Email Twitter Facebook AIM


Joined: Oct 20th, 2007
Posts: 2432

Post Posted: Aug 19th, 2008 at 8:24pm Post subject: Re: Javacode resets subid whenever loaded Reply with quote

prosumer86 wrote:
Does it matter if my index pages are .html or .php? Will this affect those subids in any way? Just wondering

oh delete that stuff from the code, that was just a debugging script to print on screen. it can be removed.

Back to top
Post new topic Reply to topic Page 1 of 1

Creative Commons License This work (Prosper202, Tracking202 and Export202) is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.