Developer forum

Forum » Templates » Google Analytics ecommerce in eCom

Google Analytics ecommerce in eCom


Reply
Google Analytics has an ecommerce part that we would like to set up in eCom.

We have placed the script in the order confirmation template and placed tags for the different info in the script.
But it does not seem to work as it should.

Any guide on how to do this right?


Replies

 
Nicolai Høeg Pedersen
Reply
We do not have a Dynamicweb specific guide...

Best I can do would be this:
http://code.google.com/intl/da-DK/apis/analytics/docs/tracking/gaTrackingEcommerce.html
 
Reply
Thanks - we have the guide.

Seems the problem could be parsing the tags inside the script.

 
Per Søgaard
Reply
 We got it working but we need tags to output all prices without the thousand separator because Google understands 1.000 as 1 making the analytics unusable.
It should output in this way even thoug the language settings on the website/area are with the separator to show prices to customers.
This is a problem for all trying to use Google ecommerce tracking with Dynamicweb (even though some havent realised it) so I hope it can be made availible.

 
Nicolai Høeg Pedersen
Reply
All prices in eCommerce are available in different formats:
http://templates.dynamicweb-cms.com/eCommerce/Dynamicweb-eCommerce-template-tags/Extentions/Price-tag-extensions.aspx

 
Casper Stendal
Reply

Hi Nicolai,

It doesn't help much, since the only format accepted by Google is the US format (12.999,95 should be 12999.95), and that's not a part of the Price object.

And since there is no "replace" methode available in the template, the only solution is to go with the *.PricePIP property, which sends all you all prices to Google in ØRE - which again gives you a very messy and almost unreadable reporting in Google.

What about *.PriceUSFormat (=12999.95) or *.CleanPriceWithoutDecimal (=12999)?

Best regards,
Casper Stendal

 
Morten Bengtson
Reply

Hi Casper,

You can format the price in javascript like this...

var pricePIP = parseInt('<!--@Ecom:Product.Price.PIP-->');
var price = (pricePIP/100).toFixed(2);

 

 

You must be logged in to post in the forum