fr | en | es | de

Frames (Framesets/Iframe)

Discover the latest tools in the
Analytics Suite, thanks to our new online help.

Two possibilities:

<script type="text/javascript">


xtnv = parent.document;  //parent.document or top.document or document        

xtsd = "http://logxxxx";

xtsite = "xxxxx"; //site number

xtn2 = "";        //level 2 site

xtpage = "";      //page name (with the use of :: to create chapters)

xtdi = "";        //implication degree

xt_multc = "";    //customised indicators

xt_an = "";       //numeric identifier

xt_ac = "";       //category

//do not modify below

if (window.xtparam!=null){window.xtparam+="&ac="+xt_ac+"&an="+xt_an+xt_multc;}

else{window.xtparam = "&ac="+xt_ac+"&an="+xt_an+xt_multc;};




<script type="text/javascript" src=""></script>



<img width="1" height="1" src="http://logxxxx.xxxx/hit.xiti?s=xxxxx&s2=&p=&di=&ac=&an=&" >



and the welcome.asp file declares the main frame (the one containing the tag code) on a different domain.


For example:


    <FRAME SRC="empty.html">

    <FRAME SRC="">



If you use the tag code above (replacing document with parent.document), this will create an "access denied" JavaScript error on the site, because it is not possible to communicate between two different domains using JavaScript. This means that nothing will be measured: neither the page, nor the referrer.

If you use the standard tag, all your referrers will be This means that your own site, and these visits will be classified as direct access.

The only way that you can retrieve the referrer is via the declaration file (welcome.asp). You then need to add it as a variable to the URL of the main frame, just like redirections to a different domain. In order to do so, please follow these steps carefully.


In the welcome.asp file, add these few lines of JavaScript code before the FRAMESET declaration:

<script language=javascript>


    xtref = document.referrer.replace(/[<>]/g, '').replace(/&/g, '$');

    if ("xtor=") > 0){

    xtquery =,;

    monquery = xtquery.substring(xtquery.indexOf("xtor="), xtquery.length);

    pos3 = monquery.indexOf("&");

    if (pos3 == -1) pos3 = monquery.indexOf("%26");

    if (pos3 == -1) pos3 = monquery.length;

    xtor = "&xtor=" + monquery.substring(monquery.indexOf("=")+1, pos3);

    }else{xtor = ""; }




Replace the direct FRAMESET declaration with a JavaScript declaration.


For example, the declaration above would be rewritten as:

<script language=javascript>


    frameset = '<FRAMESET>';

    frameset += '<FRAME SRC="empty.html">';

    frameset += '<FRAME SRC="' + xtref + xtor + '">';

    frameset += '</FRAMESET>';





Here you can see that we have added the xtref variable to the frame which directs to the content.html. This variable is then retrieved automatically using the tag code containing the ".js" file.

Please do not hesitate to contact us, should you have any queries on how to install this code.