Новости Joomla

20 лет Joomla: Ринат Кажетов.В 2025 году Joomla исполнилось 20 лет

20 лет Joomla: Ринат Кажетов.В 2025 году Joomla исполнилось 20 лет

👩‍💻 20 лет Joomla: Ринат Кажетов.В 2025 году Joomla исполнилось 20 лет. Вокруг неё сложилось большое интернациональное русскоязычное сообщество. На сайте нашего сообщества и на Хабре к юбилею были собраны интервью с его видными представителями. Сегодня мы читаем интервью с Ринатом Кажетовым (@rkazhet). Ринат - один из администраторов чата русскоязычного Joomla-сообщества, из Казахстана. Это человек, который всегда знает или найдёт нужную ссылку, пристально следит за новостями в мире Joomla, многое узнаёт первым и просто очень отзывчивый человек. Интервью с Ринатом взял Евгений Сивоконь.Читать интервью@joomlafeed#joomla #community

0 Пользователей и 1 Гость просматривают эту тему.
  • 2 Ответов
  • 7137 Просмотров
*

rezon

  • Захожу иногда
  • 83
  • 0 / 0
Кто уже настраивал ,поделитесь инфой.
может есть возможность выложить ваш работающий код
Вот офиц.https://support.google.com/googleanalytics/bin/answer.py?hl=ru&answer=66983#0.1.1_step10 мануал
Код
<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-xxxxxx-x");
 ; var pageTracker = _gat._getTracker("UA-XXXXX-1");
 pageTracker._addTrans(
 "1234", // Идентификатор заказа
 "Маунтин-Вью", // Аффилированность
 "11,99", // Итого
 "1,29", // Налог
 "5", // Доставка
 "Сан-Хосе", // Город
 "Калифорния", // Штат
 "США" // Страна
 );

 pageTracker._addItem(
 "1234", // Идентификатор заказа
 "DD44", // Единица складского хранения
 "Футболка", // Название продукта
 "Зеленая, размер M", // Категория
 "11,99", // Цена
 "1" // Количество
 );
 pageTracker._trackTrans();
 } catch(err) {}
 </script>
« Последнее редактирование: 22.05.2012, 13:26:48 от rezon »
*

rezon

  • Захожу иногда
  • 83
  • 0 / 0
нашёл инфу в буржу нете , кто может расшифровать
http://joomla-tool-shop.com/tutorials/google-analytics-transaction-tracking-in-virtuemart

Код
Tracking VirtueMart Transactions in Google Analytics

An important part of every ecommerce website is being able to track the purchases made on the website.  Using Google Analytics to do this provides the ability to view the reports on purchases tied to the other reports in Google Analytics, including sources of visits and specific advertising campaigns.  The benefits of understanding what is driving your sales is incredibly valuable.

Steps to adding Google Analytics:
Add Google Analytics to the Site
Include Transaction and Item Tracking
Confirm on GA
Add Google Analytics to the Site

Add tracking to the main website - you can include the standard tracking code before the </body> tag:
<script type="text/javascript">
 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-<span style="color: rgb(0, 0, 255);" mce_style="color: #0000ff;">xxxxxxxx-x</span>']);
 _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>
 

An alternative is to use the Web Guru Analytics plugin available at this link:

webguru-co.com/downloads/webguru-google-analytics-v.0.9.zip

Once this is done we are ready for the next step.
Include eCommerce Tracking
Tracking Transactions in Virtuemart

There are two parts to adding transation and item tracking to our website.  One step is learning how Google Analytics tracks eCommerce - using transactions and items.  We also have to find where the order has been processed in VirtueMart so we can send confirmed order information to Google Analytics.

This link provides the information about adding transactions and items to your code:

http://code.google.com/apis/analytics/docs/gaJS/gaJSApiEcommerce.html#_gat.GA_Tracker_._addTrans

Example code looks like this:
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);
_gaq.push(['_addTrans',
   '1234',          // order ID - required
   'Womens Apparel',           // affiliation or store name
   '28.28',          // total - required
   '1.29',           // tax
   '15.00',         // shipping
   'San Jose',       // city
   'California',     // state or province
   'USA'             // country
]);
_gaq.push(['_addItem',
   '1234',           // order ID - necessary to associate item with transaction
   'DD44',           // SKU/code - required
   'T-Shirt',        // product name
   'Olive Medium',   // category or variation
   '11.99',          // unit price - required
   '1'               // quantity - required
]);
_gaq.push(['_trackTrans']);

Where will we put this in our VirtueMart code?  The code in the administrator/components/com_virtuemart/html/checkout.result.php is where the return value for the payment methods is received. 

Our updated code will now look like this:
$q = "SELECT order_status, order_number, order_total, order_tax, order_shipping FROM #__{vm}_orders WHERE ";
 $q .= "#__{vm}_orders.user_id= " . $auth["user_id"] . " ";
 $q .= "AND #__{vm}_orders.order_id= $order_id ";
 

First we create a query with all the parameters we need for creating a transaction.  This will be retrieved from the database and converted to a JavaScript call to the Google Analytics _addTrans function.
 $db->query($q);
 if ($db->next_record()) {
 $order_status = $db->f("order_status");
 $order_number = $db->f("order_number");
 $order_total = $db->f("order_total");
 $order_tax = $db->f("order_tax");
 $order_shipping = $db->f("order_shipping");
 
 if($order_status == PAYPAL_VERIFIED_STATUS
 || $order_status == PAYPAL_PENDING_STATUS) { 
 
// Create a JavaScript string to add a transaction - use order number as the unique field.
 $myTagString = "
 <script type='text/javascript'>
 var _gaq = _gaq || [];
 _gaq.push(['_addTrans',
 '$order_number',           // order ID - required
 'My Fake Store',        // affiliation or store name
 '$order_total',          // total - required
 '$order_tax',           // tax
 '$order_shipping',        // shipping
'',                   // city
 '',                  // state or province
''                  // country
<pre> ]);";
 


Now we need to select the order information - this can be one or more item lines from the _vm_order_item table.  The query and while loop below creates the JavaScript to add the items to the Google Analytics transaction.

// get multiple items here
 $q2 = "SELECT * FROM #__{vm}_order_item WHERE #__{vm}_order_item.order_id= $order_id";
 $db->query($q2);
 while ($db->next_record()) {
 $item_sku = $db->f("order_item_sku");
 $item_name = $db->f("order_item_name");
 $item_price = $db->f("product_final_price");
 $item_quantity = $db->f("product_quantity");
 $myTagString .= "
 _gaq.push(['_addItem',
 '$order_number',           // order ID - necessary to associate item with transaction
 '$item_sku',           // SKU/code - required
 '$item_name',        // product name
 '',   // category or variation
 '$item_price',          // unit price - required
 '$item_quantity'               // quantity - required
 ]);";
 
 }
$myTagString .= "
 _gaq.push(['_trackTrans']);
 
 </script>
 ";
 
 $document = &JFactory::getDocument();
 $document->addCustomTag($myTagString);
  ?>
 <img src="<?php echo VM_THEMEURL ?>images/button_ok.png" align="middle"
alt="<?php echo $VM_LANG->_('VM_CHECKOUT_SUCCESS'); ?>" border="0" />
 <h2><?php echo $VM_LANG->_('PHPSHOP_PAYPAL_THANKYOU')?></h2>
  <?php
 }
 else { ?>
 <img src="<?php echo VM_THEMEURL ?>images/button_cancel.png" align="middle"
alt="<?php echo $VM_LANG->_('VM_CHECKOUT_FAILURE'); ?>" border="0" />
 
 <?php echo $VM_LANG->_('PHPSHOP_PAYPAL_ERROR')?>
  <?php
 } ?>
 



Once this code is in place you can track all your VirtueMart transactions in Google Analytics.  Happy shopping!
« Последнее редактирование: 23.05.2012, 16:19:11 от rezon »
*

mambo

  • Новичок
  • 4
  • 0 / 0
тема актуальна может кто нормально объяснить как это сделать
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Как отслеживать брошенные корзины в вирте

Автор rezon

Ответов: 13
Просмотров: 4213
Последний ответ 08.05.2014, 14:39:29
от Ruslant
Как сделать кнопку "Заказать" (только Имя и Телефон пользователя) вместо корзины?

Автор Ka_De_We

Ответов: 3
Просмотров: 2090
Последний ответ 10.03.2014, 13:08:28
от fonbok
После набора корзины и попытке авторизации выбрасывает на главную стр сайта

Автор judenfirst

Ответов: 2
Просмотров: 1971
Последний ответ 12.02.2014, 05:04:23
от psp
Переменные для электронной торговли в Google Analitics

Автор newjey

Ответов: 0
Просмотров: 1852
Последний ответ 21.08.2013, 15:50:10
от newjey
Счетчик корзины не меняется

Автор sa1981

Ответов: 22
Просмотров: 2952
Последний ответ 08.07.2013, 00:28:42
от sa1981