Что делать что бы в гугл аналитике трекались транзакции майкоммерс (регнау).
--
Have you ever considered inserting the real order value to regnow custom conversion tracking?
Please find below answer from regnow support providing the list of variables and confirming that they do work.
2. Строку _gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
меняем на
_gaq.push(['_setAccount', ga_id]);
--
Have you ever considered inserting the real order value to regnow custom conversion tracking?
Please find below answer from regnow support providing the list of variables and confirming that they do work.
Price
|
The price of a
product in the order. Only available when the order contains products from a
single vendor (except v1234). This is the unit price of a non-CD (custom CD
solution) product from that single vendor in the order. In case multiple
eligible products are in the order, an eligible product will be picked at
random
|
<show-var
name="dynavendor_price"/>
|
Product ID
|
The product ID of
a product in the order. Only available when the order contains products from
a single vendor (except v1234). This is the unit price of a non-CD (custom CD
solution) product from that single vendor in the order. In case multiple
eligible products are in the order, an eligible product will be picked at
random. The choice of product should match that of the Price field
|
<show-var
name="dynavendor_item"/>
|
Order Total
|
Total Amount Of
order
|
<show-var
name="order_total"/>
|
Tax
|
Tax
|
<show-var
name="order_tax"/>
|
Shipping
|
Shipping Chargers
|
<show-var
name="order_shipping"/>
|
City
|
City
|
<show-var
name="order_city"/>
|
State
|
State
|
<show-var
name="order_state"/>
|
Country
|
Country
|
<show-var
name="order_country"/>
|
Product Name
|
The product Name
of a product in the order. Only available when the order contains products
from a single vendor (except v1234). In case multiple eligible products are
in the order, an eligible product will be picked at random.
|
<show-var
name="dynavendor_name"/>
|
Product Category
|
The product
Category of a product in the order. Only available when the order contains
products from a single vendor (except v1234). In case multiple eligible
products are in the order, an eligible product will be picked at random.
|
<show-var
name="dynavendor_category"/>
|
Product Quantity
|
The product
quantity of a product in the order. Only available when the order contains
products from a single vendor (except v1234). In case multiple eligible
products are in the order, an eligible product will be picked at random.
|
<show-var
name="dynavendor_quantity"/>
|
<script type="text/javascript">
try {
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
_gaq.push(['_trackPageview']);
_gaq.push(['_addTrans',
'<show-var name="orderid"/>',
'RegNow',
'<show-var name="order_total"/>',
'<show-var name="order_tax"/>', // tax
'<show-var name="order_shipping"/>', // shipping
'<show-var name="order_city"/>', // city
'<show-var name="order_state"/>', // state or province
'<show-var name="order_country"/>' // country
]);
_gaq.push(['_addItem',
'<show-var name="orderid"/>',
'<show-var name="dynavendor_item"/>',
'<show-var name="dynavendor_name"/>',
'<show-var name="dynavendor_category"/>',
'<show-var name="dynavendor_price"/>',
'<show-var name="dynavendor_quantity"/>'
]);
_gaq.push(['_trackTrans']); //submits transaction to the Analytics servers
(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';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
})();
} catch(err) {}
</script>
It works, guys!
---
Если у вас эккаунт один, а продектов много (для каждого продукта свой сайт - свой google analytics id)
1. Сразу после открывающегося тега script и перед оператором try я вставлял вот такой код:
try
{
var ga_id = 'UA-XXXXXXX-X';
switch('<show-var name="dynavendor_item"/>')
{
case YOUR-ITEM1:
ga_id='YOUR-WEB-SITE-FOR-ITEM1';break;
case YOUR-ITEM2:
ga_id='YOUR-WEB-SITE-FOR-ITEM2';break;
default:
....
}
}
catch(err){}
Если у вас эккаунт один, а продектов много (для каждого продукта свой сайт - свой google analytics id)
1. Сразу после открывающегося тега script и перед оператором try я вставлял вот такой код:
try
{
var ga_id = 'UA-XXXXXXX-X';
switch('<show-var name="dynavendor_item"/>')
{
case YOUR-ITEM1:
ga_id='YOUR-WEB-SITE-FOR-ITEM1';break;
case YOUR-ITEM2:
ga_id='YOUR-WEB-SITE-FOR-ITEM2';break;
default:
....
}
}
catch(err){}
2. Строку _gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
меняем на
_gaq.push(['_setAccount', ga_id]);
Немає коментарів:
Дописати коментар