2

実際の予約エンジンがiframe内にあるホテルのウェブサイトがあります。現在、コンバージョンを検証していますが、予約数が確認ページのページビュー数と一致していないことがわかりました。

これは、予約フォームが配置されているホームページ内の分析コードです。

    <script type="text/javascript">
<!--

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1301114-2']);
  _gaq.push(['_setDomainName', '.florahospitality.com']);
  _gaq.push(['_setAllowLinker', true]);
  _gaq.push(['_setAllowHash', false]); 
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
//-->

</script>

可用性の確認ボタンのonclickイベントに、このコードを配置しました。 *return validate(); _gaq.push(['_linkByPost',this]);*

[空き状況の確認]ボタンをクリックすると、reservation.aspxにリダイレクトされます。

reserved.aspx内に次の分析スクリプトがあります

     <script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1301114-2']);
  _gaq.push(['_setDomainName', '.florahospitality.com']);
  _gaq.push(['_setAllowLinker', true]);
  _gaq.push(['_setAllowHash', false]); 
  _gaq.push(['_trackPageview']);
  _gaq.push(function() {   
  var pageTracker = _gat._getTrackerByName();   
  var iframe = document.getElementById('reservationFrame');   
  iframe.src = pageTracker._getLinkerUrl('https://reservations.synxis.com/xbe/rez.aspx?Hotel=24309&template=flex&shell=flex&Chain=5375&locale=ru&arrive=10/31/2012&depart=11/01/2012&adult=2&child=0&rooms=1&start=availresults&iata=&promo=&group='); });

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

また、reservation.aspxの内部には、別のドメインでホストされている予約エンジンの実際のURLを含むiframeがあります。

このiframe内には、クロスドメイントラッキング用に配置した別のスクリプトがあります。このスクリプトはbodyタグ内にあることに注意してください。

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1301114-2']);
  _gaq.push(['_setDomainName', 'none']);
  _gaq.push(['_setAllowLinker', true]);
  _gaq.push(['_trackPageview', 'CheckAvailability']);

  _gaq.push(['secondTracker._setAccount','UA-26368520-41']); 
  _gaq.push(['secondTracker._setDomainName', 'none']);
  _gaq.push(['secondTracker._setAllowLinker', true]);
  _gaq.push(['secondTracker._trackPageview', 'CheckAvailability']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

ご覧のとおり、変換を決定するためにtrackPageview変数を使用しています。私たちが行ったことをテストするために、3つの確認済み予約を作成し、trackPageview'確認'に3つのページビューがあるかどうかをGoogleアナリティクスで確認します。しかし残念ながら、それは1ページビューしか記録しませんでした。

セットアップで何が恋しいですか?少なくともそれらすべてを追跡することを望んでいました。

4

1 に答える 1

0

iframeの使用時に直面したセキュリティの問題もあるため、iframeを削除しました。

于 2012-12-17T12:51:23.863 に答える