Commit 61455dac authored by Slavik Fursov's avatar Slavik Fursov
Browse files

Dynamic tag path

parent 594b877c
......@@ -2,8 +2,6 @@
$uri_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$uri_segments = explode('/', $uri_path);
print_r($uri_segments);
//devc.webtrends.com/c3/acs/account/w76zpw3jrn/js/wt.js
$tag_path = '//devc.webtrends.com/' .
$uri_segments[1] . // c3
......@@ -12,3 +10,97 @@ $tag_path = '//devc.webtrends.com/' .
'/js/wt.js';
echo $tag_path;
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="<?php echo $tag_path; ?>"></script>
<title>Demo</title>
<style type="text/css">
body { margin: 0; padding: 0; background: #b3b3b3; text-align:center; } img{ border:none; }
#container{ background: #fff url(/images/demo_site_bg.jpg) no-repeat 0 0; margin:36px auto;/*center*/ height:660px; width:952px; }
#header{ padding:24px 24px 0 24px; }
#left{ float:left; width:369px; margin:36px 0px 0px 24px; } * > #left { margin:36px 0px 0px 48px; }/*reset ie6 double margin bug*/
#right{ float:right; width:459px; margin:36px 24px 0px 0px; } * > #right { margin:36px 48px 0px 0px; }/*reset ie6 double margin bug*/
#button{ margin:36px 0px; }
</style>
<script type="text/javascript">
var s_loader = '';
var show = false;
function customF2 (event) {
var output = event.name + ": " + event.state;
for (var property in event.params)
if (property != 'eventID')
output += "<br>+ "+property + ': ' + event.params[property];
s_loader += new Date().getSeconds() + ':' + new Date().getMilliseconds() + ': ' + output + '<br>'; //params, success...
if (event.name == 'done')
show = true;
if (show) {
document.getElementById('wt_offer').innerHTML = s_loader;
}
}
</script>
</head>
<body>
<div id="main_ext">
<div id="container">
<div id="header">
<div id="wt_headline">
<h1 style="color:orange" id="factor1">Headline1</h1>
<h1 style="color:blue" id="factor2">Headline2</h1>
<h1 style="color:red" id="factor3">Headline3</h1>
</div>
</div>
<div id="left">
<a href="#">
<img src="/images/demo_site_btn_green.jpg" id="cv1" /></a><br><br>
<a href="#">
<img src="/images/demo_site_btn_org.jpg" id="cv2" /></a><br><br>
<a href="#">
<img src="/images/demo_site_btn_blue.jpg" id="cv3" /></a><br><br>
<a href="#">
<img src="/images/demo_site_btn_red.jpg" id="cv4" /></a>
</div>
<div id="right">
<div id="wt_offer">
<img src="/images/demo_site_offer_green.jpg" alt="Green Offer 1" />
</div>
</div>
</div>
</div>
<h2>To use this test fixure, use URL as:<br>
http://HOST/$ENV/$GUID/any-fixture-name-you-like<br>
For example:<br>
http://test.slavikf.com/c3/w76zpw3jrn/test123
</h2>
<script type="text/javascript">
WT.addEventHandler ("INITIALIZE" , customF2,customF2);
WT.addEventHandler ("CONFIGURE" , customF2,customF2);
WT.addEventHandler ("PREPARE" , customF2,customF2);
WT.addEventHandler ("PREPROCESS" , customF2,customF2);
WT.addEventHandler ("PROCESS" , customF2,customF2);
WT.addEventHandler ("INVALID" , customF2,customF2);
WT.addEventHandler ("ABORT" , customF2,customF2);
WT.addEventHandler ("PRERENDER", customF2, customF2);
WT.addEventHandler ("RENDER" , customF2,customF2);
WT.addEventHandler ("DONE" , customF2,customF2);
WT.addEventHandler ("PAGEVIEW" , customF2,customF2);
WT.addEventHandler ("CONVERSION" , customF2,customF2);
WT.addEventHandler ("DOM_ONLOAD" , customF2,customF2);
WT.addEventHandler ("hide_show" , customF2,customF2);
WT.addEventHandler ("LIBRARY_LOAD" , customF2,customF2);
</script>
</body>
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment