質問 > 管理機能 > GoogleAnalytics eコマーストラッキング導入のやり方 |
管理機能
フラット表示 | 前のトピック | 次のトピック |
投稿者 | スレッド |
---|---|
poporin |
投稿日時: 2014/1/6 20:27
対応状況: −−−
|
常連 登録日: 2012/6/6 居住地: 投稿: 68 |
Re: GoogleAnalytics eコマーストラッキング導入のやり方 casa様
お返事どうもありがとうございます。 >>EC-CUBE本体のLC_Page_Shopping_Complete_Ex.phpがペイジェントのフォルダ内のものと同じになっているかどうかご確認ください。 上記につきましては全く同じ内容でしたので問題はないと思われます。 http://www.kiteretsu-so.com/archives/1955 上記サイトを参考にそのままコピペ記述して、テスト購入をしてみたところ 購入管理画面で下記のようなエラーがでて、システムエラーとなりました。 ECCUBEの管理画面には注文が入っています。 エラー内容 USER_AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 Fatal error(E_PARSE): syntax error, unexpected T_STRING on [/home/mydomain/data/class/pages/shopping/LC_Page_Shopping_Complete.php(69)] このエラーは記述ミスによるものでしょうか? コピペしているので、記述する場所が違うのかもしれませんが 下記の場所で大丈夫でしょうか? 記述場所は133行目までありませんでしたので下記にしております。 /** * Page のアクション. * * @return void */ function action() { $this->arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); // Eコマーストラックング用 追加 $sql_item = “SELECT product_name,product_code,price,quantity FROM dtb_order_detail WHERE order_id = ?”; $arrItems = $objQuery->getall($sql_item, array($order_id)); $this->arrItems = $arrItems; $sql_order = “SELECT total,tax,deliv_fee,order_pref FROM dtb_order WHERE order_id = ?”; $arrOrder = array_shift($objQuery->getall($sql_order, array($order_id))); $this->orderId = $order_id; $this->total = $arrOrder['total']; $this->tax = $arrOrder['tax']; $this->deliv_fee = $arrOrder['deliv_fee']; $this->order_pref = $objQuery->get(“mtb_pref”, “pref_name”, “pref_id = ? “, array($arrOrder['order_pref'])); // Eコマーストラックング用 終了 unset($_SESSION['order_id']); } 購入完了画面でJavaScriptは下記のように出力されておりました。 /data/Smarty/templates/default/site_main.tpl <!--–{if $tpl_mainpage==”shopping/complete.tpl”}–--> <!-- Google Analytics eコマーストラッキング start --> <script type="”text/javascript”"> var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.” : “http://www.”); document.write(unescape(“%3Cscript src=’” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”)); </script> <script type="”text/javascript”"> try { var pageTracker = _gat._getTracker(“UA-********”); //←実際には番号が入っております pageTracker._trackPageview(); pageTracker._addTrans( “<!–{$orderId}–>”, // Order ID “”, // Affiliation “<!–{$total}–>”, // Total “<!–{$tax}–>”, // Tax “<!–{$deliv_fee}–>”, // Shipping “”, // City “<!–{$order_pref}–>”, // State “JP” // Country ); //ここから各商品情報のループ <!–{section name=cnt loop=$arrItems}–> pageTracker._addItem( “<!–{$orderId}–>”, // Order ID “<!–{$arrItems[cnt].product_code}–>”, // SKU “<!–{$arrItems[cnt].product_name}–>”, // Product Name “”, // Category “<!–{$arrItems[cnt].price}–>”, // Price “<!–{$arrItems[cnt].quantity}–>” // Quantity ); <!–{/section}–> pageTracker._trackTrans(); // 取引と商品の内容をGAに通知 <!– eコマース用タグ end –> } catch(err) {} // –> </script> <!--– Google Analytics eコマーストラッキング end –--> <!--–{/if}–--> 原因はわかりますでしょうか? どうぞよろしくお願いいたします。 EC-CUBEバージョン 2.12.6 PHPバージョン PHP 5.3.3 DBバージョン PostgreSQL 8.4.13 |
フラット表示 | 前のトピック | 次のトピック |
題名 | 投稿者 | 日時 |
---|---|---|
GoogleAnalytics eコマーストラッキング導入のやり方 | poporin | 2013/12/25 17:32 |
Re: GoogleAnalytics eコマーストラッキング導入のやり方 | casa | 2013/12/26 10:37 |
Re: GoogleAnalytics eコマーストラッキング導入のやり方 | casa | 2013/12/26 10:39 |
Re: GoogleAnalytics eコマーストラッキング導入のやり方 | poporin | 2013/12/26 14:14 |
Re: GoogleAnalytics eコマーストラッキング導入のやり方 | poporin | 2013/12/28 12:11 |
Re: GoogleAnalytics eコマーストラッキング導入のやり方 | casa | 2014/1/6 16:44 |
» Re: GoogleAnalytics eコマーストラッキング導入のやり方 | poporin | 2014/1/6 20:27 |
Re: GoogleAnalytics eコマーストラッキング導入のやり方 | casa | 2014/1/7 10:46 |
Re: GoogleAnalytics eコマーストラッキング導入のやり方 | poporin | 2014/1/10 20:15 |