{"_id":"565e424ef76b8d0d00554183","project":"5643e1c19eebf70d00490e46","__v":7,"category":{"_id":"56586e2f3df5130d00a57a14","project":"5643e1c19eebf70d00490e46","version":"5643e1c19eebf70d00490e49","pages":["56586e5c8752730d007623c5","565e3191ea46251700972591","565e32c5ea46251700972594","565e34a58f048c2100442a42","565e3571413e06170093dcfe","565e3758009b3019007c7497","565e3c347eac990d00f81512","565e40e1ea462517009725b2","565e41037eac990d00f81516","565e411423fd5f0d00a12900","565e4120ea462517009725b4","565e4233413e06170093dd23","565e424ef76b8d0d00554183","565e53d423fd5f0d00a12918","565e564023fd5f0d00a1291c","565e5c4bf76b8d0d0055419d","565e5c56009b3019007c74be","565f26a1649b951900c89715","565f6f97de5dc50d00acfee0","5665eed53889610d0008a320","568bdc0697d8960d0012ac4d","569ea7694a5c8b0d00744afc"],"__v":22,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-11-27T14:52:31.189Z","from_sync":false,"order":2,"slug":"test","title":"Tutorials and Guides"},"version":{"_id":"5643e1c19eebf70d00490e49","__v":6,"project":"5643e1c19eebf70d00490e46","createdAt":"2015-11-12T00:48:01.649Z","releaseDate":"2015-11-12T00:48:01.649Z","categories":["5643e1c29eebf70d00490e4a","56586e2f3df5130d00a57a14","565f12c37f93280d0052cea5","565f1325bca87d0d006bc618","565f161f649b951900c896cb","565f165a0dc99e1900f24b56"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.9.37","version":"1.9.37"},"user":"565dfa3460497d1700ecce49","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-02T00:58:54.794Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"**Please note that some of these are really old scripts but we're including them for legacy sake:**\n\nBelow you'll find three available scripts. **[iFrame](https://prosper202.readme.io/docs/script-tutorials#section-iframe-script)**, **[Dynamic Keyword Insertion](https://prosper202.readme.io/docs/script-tutorials#section-putting-dynamic-keywords-in-your-landing-pages)**, and **[Page Load Time Analysis](https://prosper202.readme.io/docs/script-tutorials#section-landing-page-load-time-analysis)**.\n\n## iFrame Script\n\nHere is the correct code to use for iframing an offer with Tracking202. The Prosper202 self-hosted version will be slightly different, but its the exact same idea. Place the Javascript at the end, and have the iframe src set to the landing page outbound link, not the php redirect code.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<html>\\n     \\t<head>\\n          \\t<title>Title Goes Here</title>\\n     \\t</head>\\n     \\t<body style=\\\"margin: 0px; padding: 0px;\\\" scroll=\\\"no\\\">\\n          \\t<iframe src=\\\"http://redirect.tracking202.com/lp/XXXXXX\\\" style=\\\"border: 0px; width: 100%; height:100%;\\\"></iframe>\\n          \\t<script src=\\\"http://static.tracking202.com/lp/XXXXXX/landing.js\\\" type=\\\"text/javascript\\\"></script>\\n     \\t</body>\\n</html>\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\nUsing an Iframe on the 2nd page, instead of redirecting through the affiliate link\nSometimes you may just want a regular landing page as the first page the visitor sees, but then instead of having a link that redirects out to the offer destination url, you instead want the 2nd page to just be an iframe of the offer. So in this aspect the visitor never actually leaves your domain. They land on the first page, which is a regular page that tries to make them click through and then instead when they click through to redirect them to the offer, you instead have a page that iframes the offer. This makes it look like the user is still on your page. Below I will show you how to do this.\n\nThe basic concept is acutally quite simple; instead of redirecting to the affiliate url, we are now just going to have an iframe and paste the affiliate url as the IFRAME SRC. You can do this by modifing the simple or advance landing page PHP REDIRECT code by using the example below. All that is happening is instead of using the previous header() command which redirects the user, we now echo (which prints to HTML) the url in the IFRAME SRC. See below:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  \\n//$tracking202outbound is where the user is suppose to be redirected to\\n  if (isset($_COOKIE['tracking202outbound'])) {\\n    $tracking202outbound = $_COOKIE['tracking202outbound'];     \\n  } else {\\n    $tracking202outbound = 'http://redirect.tracking202.com/lp/xxxxx';   \\n  }\\n  \\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<html>\\n   <head>\\n       <title>Title Goes Here</title>\\n    </head>\\n    <body style=\\\"margin: 0px; padding: 0px;\\\" scroll=\\\"no\\\">\\n          <iframe src=\\\"<? echo $tracking202outbound; ?>\\\" \\n                 style=\\\"border: 0px; width: 100%; height:100%;\\\"></iframe>\\n    </body>\\n</html>\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\n## Putting Dynamic Keywords in your Landing Pages\n\nThis shows how to dynamically display the keyword the user was searching for on your landing page. This is a simple script that prints the dynamic keyword on the page for users with Tracking202 installed. Below is an example landing page .php file that shows how to place dynamic keywords on your landing page!\n\n**Landing Page Code** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?\\n\\n//grab t202 keyword\\n$keyword = $_GET['t202kw'];\\n\\n//if a yahoo keyword exists, over-write the t202 keyword\\n//for Yahoo OVKEY = the bidded keyword, OVRAW = actual keyword\\n//you can change $_GET['OVRAW'] to $_GET['OVKEY'] if you would\\n//like to display the bidded keyword, instead of the actual keyword.\\nif ($_GET['OVKEY']) { $keyword = $_GET['OVKEY']; }  \\n\\n//now anywhere we call echo $keyword, it will display the dynamic kw!\\n\\n//extra goodie, uncomment the line below if you would like to capitalize \\n//the first character in each word\\n//$keyword = ucwords(strtolower($keyword)); \\n\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<html>\\n    <head>\\n        <!-- Display the Dynamic Keyword in the Title! -->\\n        <title><? echo $keyword; ?></title>\\n    </head>\\n    <body>\\n    \\n        <!-- Display the Dynamic Keyword in the body's content! -->\\n        This is the content on my landing page! You were searching for <? echo $keyword; ?>.\\n    \\n    </body>\\n</html> \",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\nAnywhere you now call <? echo $keyword; ?> in your .php file, it will print out the dynamic keyword insertion!\n\n## Landing Page Load Time Analysis\n\nWith quality scoring, taking into account how fast your landing page loads, is increasingly more important to build faster loading landing pages. And to analyze that we have a simple script, the same one we use on Prosper202.com (see below) that displays at the bottom of each page: how long it took to load. Below is the script that shows how to set this up.\n\n**Landing Page Code** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<? $microtimer = microtime();  /*set the timer, this is to be placed at the top! */  ?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<html>\\n    <head>\\n        <title>Title</title>\\n    </head>\\n    <body>\\n    \\n        Blah Blah Blah, this is my content!\\n        \\n        <? //print on the screen how long this page to took to load\\n        $seconds =  microtime() - $microtimer;\\n        echo 'This page took ' . round($seconds,3) . ' seconds to load.'; ?>\\n    \\n    </body>\\n</html> \",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\nSo now at the bottom of each page it will say: This page took xxxxx seconds to load.","excerpt":"","slug":"script-tutorials","type":"basic","title":"Script Tutorials"}
**Please note that some of these are really old scripts but we're including them for legacy sake:** Below you'll find three available scripts. **[iFrame](https://prosper202.readme.io/docs/script-tutorials#section-iframe-script)**, **[Dynamic Keyword Insertion](https://prosper202.readme.io/docs/script-tutorials#section-putting-dynamic-keywords-in-your-landing-pages)**, and **[Page Load Time Analysis](https://prosper202.readme.io/docs/script-tutorials#section-landing-page-load-time-analysis)**. ## iFrame Script Here is the correct code to use for iframing an offer with Tracking202. The Prosper202 self-hosted version will be slightly different, but its the exact same idea. Place the Javascript at the end, and have the iframe src set to the landing page outbound link, not the php redirect code. [block:code] { "codes": [ { "code": "<html>\n \t<head>\n \t<title>Title Goes Here</title>\n \t</head>\n \t<body style=\"margin: 0px; padding: 0px;\" scroll=\"no\">\n \t<iframe src=\"http://redirect.tracking202.com/lp/XXXXXX\" style=\"border: 0px; width: 100%; height:100%;\"></iframe>\n \t<script src=\"http://static.tracking202.com/lp/XXXXXX/landing.js\" type=\"text/javascript\"></script>\n \t</body>\n</html>", "language": "html" } ] } [/block] Using an Iframe on the 2nd page, instead of redirecting through the affiliate link Sometimes you may just want a regular landing page as the first page the visitor sees, but then instead of having a link that redirects out to the offer destination url, you instead want the 2nd page to just be an iframe of the offer. So in this aspect the visitor never actually leaves your domain. They land on the first page, which is a regular page that tries to make them click through and then instead when they click through to redirect them to the offer, you instead have a page that iframes the offer. This makes it look like the user is still on your page. Below I will show you how to do this. The basic concept is acutally quite simple; instead of redirecting to the affiliate url, we are now just going to have an iframe and paste the affiliate url as the IFRAME SRC. You can do this by modifing the simple or advance landing page PHP REDIRECT code by using the example below. All that is happening is instead of using the previous header() command which redirects the user, we now echo (which prints to HTML) the url in the IFRAME SRC. See below: [block:code] { "codes": [ { "code": "<?php\n \n//$tracking202outbound is where the user is suppose to be redirected to\n if (isset($_COOKIE['tracking202outbound'])) {\n $tracking202outbound = $_COOKIE['tracking202outbound']; \n } else {\n $tracking202outbound = 'http://redirect.tracking202.com/lp/xxxxx'; \n }\n \n?>", "language": "php" } ] } [/block] [block:code] { "codes": [ { "code": "<html>\n <head>\n <title>Title Goes Here</title>\n </head>\n <body style=\"margin: 0px; padding: 0px;\" scroll=\"no\">\n <iframe src=\"<? echo $tracking202outbound; ?>\" \n style=\"border: 0px; width: 100%; height:100%;\"></iframe>\n </body>\n</html>", "language": "html" } ] } [/block] ## Putting Dynamic Keywords in your Landing Pages This shows how to dynamically display the keyword the user was searching for on your landing page. This is a simple script that prints the dynamic keyword on the page for users with Tracking202 installed. Below is an example landing page .php file that shows how to place dynamic keywords on your landing page! **Landing Page Code** [block:code] { "codes": [ { "code": "<?\n\n//grab t202 keyword\n$keyword = $_GET['t202kw'];\n\n//if a yahoo keyword exists, over-write the t202 keyword\n//for Yahoo OVKEY = the bidded keyword, OVRAW = actual keyword\n//you can change $_GET['OVRAW'] to $_GET['OVKEY'] if you would\n//like to display the bidded keyword, instead of the actual keyword.\nif ($_GET['OVKEY']) { $keyword = $_GET['OVKEY']; } \n\n//now anywhere we call echo $keyword, it will display the dynamic kw!\n\n//extra goodie, uncomment the line below if you would like to capitalize \n//the first character in each word\n//$keyword = ucwords(strtolower($keyword)); \n\n?>", "language": "php" } ] } [/block] [block:code] { "codes": [ { "code": "<html>\n <head>\n <!-- Display the Dynamic Keyword in the Title! -->\n <title><? echo $keyword; ?></title>\n </head>\n <body>\n \n <!-- Display the Dynamic Keyword in the body's content! -->\n This is the content on my landing page! You were searching for <? echo $keyword; ?>.\n \n </body>\n</html> ", "language": "html" } ] } [/block] Anywhere you now call <? echo $keyword; ?> in your .php file, it will print out the dynamic keyword insertion! ## Landing Page Load Time Analysis With quality scoring, taking into account how fast your landing page loads, is increasingly more important to build faster loading landing pages. And to analyze that we have a simple script, the same one we use on Prosper202.com (see below) that displays at the bottom of each page: how long it took to load. Below is the script that shows how to set this up. **Landing Page Code** [block:code] { "codes": [ { "code": "<? $microtimer = microtime(); /*set the timer, this is to be placed at the top! */ ?>", "language": "php" } ] } [/block] [block:code] { "codes": [ { "code": "<html>\n <head>\n <title>Title</title>\n </head>\n <body>\n \n Blah Blah Blah, this is my content!\n \n <? //print on the screen how long this page to took to load\n $seconds = microtime() - $microtimer;\n echo 'This page took ' . round($seconds,3) . ' seconds to load.'; ?>\n \n </body>\n</html> ", "language": "html" } ] } [/block] So now at the bottom of each page it will say: This page took xxxxx seconds to load.