If you are running split/AB testing on your website you may find that the call tracking data does not include the standard referral information relating to how the user came to your site, for example the search engine that was used. The reason for this issue is that when split testing Delacon's standard tracking code does not have time to run before the page redirect occurs and the referral information from site entry is not captured.
To address this issue, the customised tracking code below can be used. This needs to be added to the header of the landing page being split tested so the referral details can be captured before the A or B page loads.
<script type="text/javascript">
var cids="XXXXXX";
var refStr = escape(document.referrer);
var sessid="";
var sessStatus="";
if(document.cookie.length>0)
{
var search1="delaconsessid=";
var offset1 = document.cookie.indexOf(search1);
if(offset1 != -1)
{
offset1 += search1.length;
var end1 = document.cookie.indexOf(";", offset1);
if (end1 == -1)
{
end1 = document.cookie.length;
}
sessid=unescape(document.cookie.substring(offset1, end1));
}
}
if (sessid == "") {
sessStatus=1;
sessid='xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
return v.toString(16);
});
document.cookie="delaconsessid="+ sessid+"; path=/;" ;
}
var ddd = document, lll = ddd.createElement('script'), sss = ddd.getElementsByTagName('script')[0];
lll.type = 'text/javascript'; lll.async = true;
lll.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'vxml4.delacon.com.au/sited/ref/phnumint_md_gp.jsp?sessId=' + sessid + '&sessStatus=' + sessStatus + '&m_id=1209' + '&cids=' + cids + '&ref=' + refStr;
sss.parentNode.insertBefore(lll, sss);
</script>
The var cids="XXXXXX"; line needs to be updated with your own CID (replacing XXXXXX), if multiple CIDs are in use these should be comma separated.
Please note that Delacon's standard tracking code and implementation should be used on any subsequent pages.
Please contact support@delaconcorp.com if you have any questions.
Comments
0 comments
Please sign in to leave a comment.