|
Custom Search
|
Hi.
I maintain four websites on subdomains of a main domain (www dot oghme dot com). The main site is a portal to the four others, by means of four banner displaying on the main page.
I've redirected The target of my advertizing campaigns on my 4 sites to the portal instead of the individual sites. Problem is, I developped a perl pipeline to analyse logs and build stats, which use the URL parameters from the visitor (google/project wonderful add campaigns), for every site. But as all paid visits now go to the portal site, they won't reach the secondary sites.
That's why I need to insert those informations into the <a> links on the portal page, and have added some php code to my CMS' templates (using Dotclear), as follows :
$core->tpl->addValue('RepeatURLParameters',array('tplURLParams','RepeatURLParameters'));
class tplURLParams
{
public static function RepeatURLParameters($attr)
{
$f = $GLOBALS['core']->tpl->getFilters($attr);
# (isset($_GET['ID'])?$_GET['ID']:'')
# $_SERVER['QUERY_STRING'] la query string du referer
# $_SERVER['HTTP_REFERER']
$chain = "";
$thisReferer = $_SERVER['HTTP_REFERER'];
$thisQueryS = $_SERVER['QUERY_STRING'];
if(isset($_SERVER['HTTP_REFERER'])) {
$div = split("[&]",$thisQueryS);
foreach($div as $var){$chain .= $var."&";}
}
$chain .= "BeforeOghmeFrom=$thisReferer";
return $chain;
}
}then I insert the params in the <a> link as follows :
<a href="url_destination_site_of_mine?{{tpl:RepeatURLParameters}}">When I then visit my portal and click on one of those links, Crawltrack detects a code injection.
I must say that I am impressed. It works well. What I'm doing is indeed a code injection, but from the server. Only thing is I need to inject these parameters. Does anyone know of a workaround ?
NB : I've added all my websites as trusted sites in crawltrack, but it doesn't seem to prevent my problem.
Thanks in advance.
Offline
Hi
I will continue in english even if looking at your sites it's look like you speak french
, but we are in the english forum...
If you don't want CrawlTrack to block these links, it's the site which are in the {{tpl:RepeatURLParameters}} which need to be add in the trusted sites list.
As if I understand well, the link is build with including the referer it will not be easy. But there is maybe a solution, contact me by email as I prefere not to put it here.
Jean-Denis
Offline
Contacted by email. Problem solved. Thanks a lot !
Offline
Edgepark Medical |
SwipeAuctions |