- Posts: 13
- Thank you received: 0
How to get variables for tracking?
- yolknet_old
-
Topic Author
- Offline
Less
More
12 years 7 months ago #150173
by yolknet_old
How to get variables for tracking? was created by yolknet_old
-- HikaShop version -- : Essential 2.2.2
-- Joomla version -- : 3.2.3
In Google Analytics we would like to track the conversion of items in orders. In a tutorial I found the code below that should be placed on the thank-you-page. But how do I get the variables like transfer ID or the total price?
_gaq.push(['_addTrans',
'<?php echo trans_id; ; ?>', // Ordernummer
'<?php echo 'Webwinkel Lotje'; ?>', // Naam webwinkel
'<?php echo trans_total; ?>', // Totaalbedrag bestelling
'<?php echo trans_tax; ?>', // BTW
'<?php echo trans_shipping; ?>', // Verzendkosten
'<?php echo shipping_city; ?>', // Stad
'<?php echo shipping_state; ?>', // Provincie
'<?php echo shipping_country; ?>' // Land
]);
foreach ($items as $item} {
_gaq.push(['_addItem',
'<?php echo trans_id; ?>', // Ordernummer
'<?php echo $item_sku_code; ?>', // Artikelnummer
'<?php echo $item_name; ?>', // Productnaam
'<?php echo $item_category; ?>', // Categorie
'<?php echo $item_price; ?>', // Productprijs
'<?php echo $item_quantity; ?>' // Aantal
]);
}
-- Joomla version -- : 3.2.3
In Google Analytics we would like to track the conversion of items in orders. In a tutorial I found the code below that should be placed on the thank-you-page. But how do I get the variables like transfer ID or the total price?
_gaq.push(['_addTrans',
'<?php echo trans_id; ; ?>', // Ordernummer
'<?php echo 'Webwinkel Lotje'; ?>', // Naam webwinkel
'<?php echo trans_total; ?>', // Totaalbedrag bestelling
'<?php echo trans_tax; ?>', // BTW
'<?php echo trans_shipping; ?>', // Verzendkosten
'<?php echo shipping_city; ?>', // Stad
'<?php echo shipping_state; ?>', // Provincie
'<?php echo shipping_country; ?>' // Land
]);
foreach ($items as $item} {
_gaq.push(['_addItem',
'<?php echo trans_id; ?>', // Ordernummer
'<?php echo $item_sku_code; ?>', // Artikelnummer
'<?php echo $item_name; ?>', // Productnaam
'<?php echo $item_category; ?>', // Categorie
'<?php echo $item_price; ?>', // Productprijs
'<?php echo $item_quantity; ?>' // Aantal
]);
}
Please Log in or Create an account to join the conversation.
12 years 7 months ago #150182
by nicolas
Replied by nicolas on topic How to get variables for tracking?
Hi,
You could simply configure the google analytics plugin that is available in the Business edition for that:
www.hikashop.com/support/support/documen...oogle-analytics.html
Otherwise, here is some information on adding custom code for tracking:
www.hikashop.com/forum/4-how-to/68067-tr...get-cart-values.html
You could simply configure the google analytics plugin that is available in the Business edition for that:
www.hikashop.com/support/support/documen...oogle-analytics.html
Otherwise, here is some information on adding custom code for tracking:
www.hikashop.com/forum/4-how-to/68067-tr...get-cart-values.html
Please Log in or Create an account to join the conversation.
- yolknet_old
-
Topic Author
- Offline
Less
More
- Posts: 13
- Thank you received: 0
12 years 7 months ago #150910
by yolknet_old
Replied by yolknet_old on topic How to get variables for tracking?
Thank you for the links. In the Business Edition is a Google plugin, but we are using the Essential version.
Please Log in or Create an account to join the conversation.
12 years 7 months ago #150912
by Xavier
Replied by Xavier on topic How to get variables for tracking?
Hi,
If you really need this plugin, you can upgrade your version:
www.hikashop.com/extensions/upgrade-my-version.html
If you really need this plugin, you can upgrade your version:
www.hikashop.com/extensions/upgrade-my-version.html
Please Log in or Create an account to join the conversation.
Time to create page: 0.046 seconds