*NOTE* This solution requires your store to have OpenUI installed. It will NOT work without it.
1. Add the javascript code into yoru head tag.
Login to you MIVA Merchant 4 Admin.
Click on the
next to Stores.
Click on your storename.
Click the Head/Body Tag tab on the right..
Paste in the tracking code that Google sent you below all other code in the HEAD Tag Content textbox.
Replace ######-# with your Google Analytics account number.
%OUI%
%begin_notsecure%
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-######-#";
urchinTracker();
</script>
%end_notsecure%
%begin_secure%
<script src="https://ssl.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-#####-#";
_udn = "domain.com";
urchinTracker();
</script>
%end_secure%
Click the Update button. 2. Add the conversion tracking code to track sales data.
Click on Hdr/Ftr - Checkout Screens in the tabs on the right.
Scroll down to the last text box: Invoice Footer: [Screen=INVC].
Paste the conversion tracking code (see below) in the box.
%OUI%
<form name="utmform">
<textarea id="utmtrans" rows="15" cols= "150">
UTM:T|%ORDERNUM%|StoreName|%order_total%|%order_tax%|%order_shipping%|%VAR(Orders.d.ship_city)%|%VAR(Orders.d.ship_state)%|%VAR(Orders.d.ship_cntry)%
%FUNC(OrderItem_FindFirst_Order(Orders.d.id))%
%WHILE(g.OUIX_FuncReturn)%
%FUNC(Product_Find_Code(OrderItems.d.code))%
UTM:I|%ORDERNUM%|%VAR(OrderItems.d.code)%|%VAR(OrderItems.d.name)%||%VAR(OrderItems.d.price)%|%VAR(OrderItems.d.quanttity)%
%FUNC(OrderItem_FindNext_Order(Orders.d.id))%
%WHILEEND%
</textarea>
</form>
3. Add code to 'trigger' the tracking script to work by inserting a javascript onLoad() call in BODY tag.
Click the Head/Body Tag tab on the right.
In the BODY Tag box, add the following:
%OUI%
%begin_screen|INVC%onLoad= "javascript:__utmSetTran s()"%end_screen|INVC%
Click the Update button.
4. Make sure you have E-Commerce Tracking turned on in your Google Analytics account:
Log in to your Google Analytics account.
Click Edit next to the profile you'd like to enable.
On the Profile Settings page, click edit next to Main Website Profile Information.
Change the E- Commerce Website radio button from No to Yes.
5. Activate the tracking feature in your Analytics Account:
Click Analytics Settings below the Google logo at the top of the page.
Click Check Status next to the profile that you created for your store.
Your Google Analytics account should now be collecting data. It takes 24-48 hours to get the first data to generate reports.