Totally Zenned
- Join Date:
- Oct 2006
- Location:
- Italy
- Posts:
- 636
- Plugin Contributions:
- 0
Google Analytics Integration
All works great!
But my order total is euro324,30, instead in analytics I see euro324,00; tax is 54,05, I see 54,00....
Why?
Views: 225,786
Totally Zenned
All works great!
But my order total is euro324,30, instead in analytics I see euro324,00; tax is 54,05, I see 54,00....
Why?
Totally Zenned
100asa:
All works great!
But my order total is euro324,30, instead in analytics I see euro324,00; tax is 54,05, I see 54,00....
Why?
How did you get it to show in analytics? Is it constantly showing.. or just every few transactions? Mine recorded 2 transactions and didn't record anything afterwards
Totally Zenned
The record by Google analytics is more slow, but it record all (at this time)
I've installed only variant_include mod by Andrew, and all works!
The little bug is only the amount of transaction, as I say in the last post.
Totally Zenned
on line 45.. try changing
number_format($products->fields['final_price'], 2, ',', '')
to
number_format($products->fields['final_price'], 2, '.', ',')
I haven't tested this.. however I'm in the process of doing so (just installed latest version w/ this change).. so ill report back once i get some sales :)
Totally Zenned
I'm an Italian seller. Our prices is in Euro; ex 1.320,45
I can't see the decimal amount.
I'm trying this change, and I wait next sales :-)
Deceased
getyourgameshere.com:
on line 45.. try changing
number_format($products->fields['final_price'], 2, ',', '')
>
> to
>
> ```
number_format($products->fields['final_price'], 2, '.', ',')
```Yes, yes, yes!!!
New Zenner
Hi guys,
This thread is now famous. I found it through Google.
I'm new to this discussion, and I know that mods have been presented, bugs have been reported, bugs have been fixed, things have been updated, etc.
What I'm here to ask, for all the newbs who have just surfed in and see an 18 page thread:
What is the current disposition? Just to drop the Analytics script into a particular file, and tell google the URL for our checkout page? Or should we use a particular, updated module, or what? Thanks.
Totally Zenned
Download the latest mod by Andrew http://zen-cart.spb.ru/index.php?main_page=contributions
and then use only variant_include.
So my google analytics works very well!
New Zenner
100asa:
Download the latest mod by Andrew http://zen-cart.spb.ru/index.php?main_page=contributions
and then use only variant_include.
So my google analytics works very well!
In the zip file I have located the variant_include folder. Inside it is the Includes folder. In that is the Templates folder. Inside that is the YOUR_TEMPLATE folder. Inside that is the Common folder, and in that is the file tpl_footer_googleanalytics.php.
So do I put the variant_include folder and everything inside it in a particular directory? Or just tpl_footer_googleanalytics.php? Or do I need to do something else?
Zen Follower
Ok I have been saying I was going to release a simplified version of this moduke for some time now and I finally got around to doing it. My version does not include any extra JavaScript works for secure and nonsecure pages and allows for full ecommerce tracking. The tracking code and the checkout success code is included at the bottom of your template and visable.
There are only 2 files to upload one of which is only one line and an sql patch. It is based on a_berezin's code here but reduced and reworked.
The support thread is at:
http://www.zen-cart.com/forum/showthread.php?t=53701
Download is currently available at:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=412
Hope this helps some of you out.
New Zenner
Okay,
I'm following the instructions in the README file, which say:
<?php require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php'); ?>However, my tpl_main_page.php file does not contain a </body> tag. This is the full text of my tpl_main_page.php file:
- At the bottom of templates/[your_template]/common/tpl_main_page.php
Add this just before the </body> tag:
<?php /** * Common Template - tpl_main_page.php * * Governs the overall layout of an entire page<br /> * Normally consisting of a header, left side column. center column. right side column and footer<br /> * For customizing, this file can be copied to /templates/your_template_dir/pagename<br /> * example: to override the privacy page<br /> * - make a directory /templates/my_template/privacy<br /> * - copy /templates/templates_defaults/common/tpl_main_page.php to /templates/my_template/privacy/tpl_main_page.php<br /> * <br /> * to override the global settings and turn off columns un-comment the lines below for the correct column to turn off<br /> * to turn off the header and/or footer uncomment the lines below<br /> * Note: header can be disabled in the tpl_header.php<br /> * Note: footer can be disabled in the tpl_footer.php<br /> * <br /> * $flag_disable_header = true;<br /> * $flag_disable_left = true;<br /> * $flag_disable_right = true;<br /> * $flag_disable_footer = true;<br /> * <br /> * // example to not display right column on main page when Always Show Categories is OFF<br /> * <br /> * if ($current_page_base == 'index' and $cPath == '') {<br /> * $flag_disable_right = true;<br /> * }<br /> * <br /> * example to not display right column on main page when Always Show Categories is ON and set to categories_id 3<br /> * <br /> * if ($current_page_base == 'index' and $cPath == '' or $cPath == '3') {<br /> * $flag_disable_right = true;<br /> * }<br /> * * @package templateSystem * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: tpl_main_page.php 3856 2006-06-29 02:26:33Z drbyte $ */ // the following IF statement can be duplicated/modified as needed to set additional flags if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) { $flag_disable_right = true; } $header_template = 'tpl_header.php'; $footer_template = 'tpl_footer.php'; $left_column_file = 'column_left.php'; $right_column_file = 'column_right.php'; $body_id = str_replace('_', '', $_GET['main_page']); ?> <body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>> <?php if (SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) { if ($banner->RecordCount() > 0) { ?> <div id="bannerOne" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> <?php } } ?> <div id="mainWrapper"> <?php /** * prepares and displays header output * */ require($template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php');?> <table width="100%" border="0" cellspacing="0" cellpadding="0" id="contentMainWrapper"> <tr> <?php if (COLUMN_LEFT_STATUS == 0 or (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '')) { // global disable of column_left $flag_disable_left = true; } if (!isset($flag_disable_left) || !$flag_disable_left) { ?> <td id="navColumnOne" class="columnLeft" style="width: <?php echo COLUMN_WIDTH_LEFT; ?>"> <?php /** * prepares and displays left column sideboxes * */ ?> <div id="navColumnOneWrapper" style="width: <?php echo BOX_WIDTH_LEFT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_left.php')); ?></div></td> <?php } ?><!-- bof breadcrumb --> <?php if (DEFINE_BREADCRUMB_STATUS == '1') { ?><td valign="top"><?php } ?> <!-- eof breadcrumb --> <?php if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) { if ($banner->RecordCount() > 0) { ?> <div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> <?php } } ?> <!-- bof upload alerts --> <?php if ($messageStack->size('upload') > 0) echo $messageStack->output('upload'); ?> <!-- eof upload alerts --> <?php /** * prepares and displays center column * */ require($body_code); ?> <?php if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) { if ($banner->RecordCount() > 0) { ?> <div id="bannerFour" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> <?php } } ?></td> <?php if (COLUMN_RIGHT_STATUS == 0 or (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '')) { // global disable of column_right $flag_disable_right = true; } if (!isset($flag_disable_right) || !$flag_disable_right) { ?> <td id="navColumnTwo" class="columnRight" style="width: <?php echo COLUMN_WIDTH_RIGHT; ?>"> <?php /** * prepares and displays right column sideboxes * */ ?> <div id="navColumnTwoWrapper" style="width: <?php echo BOX_WIDTH_RIGHT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_right.php')); ?></div></td> <?php } ?> </tr> </table> <?php /** * prepares and displays footer output * */ require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');?> </div> <!--bof- parse time display --> <?php if (DISPLAY_PAGE_PARSE_TIME == 'true') { ?> <div class="smallText center">Parse Time: <?php echo $parse_time; ?> - Number of Queries: <?php echo $db->queryCount(); ?> - Query Time: <?php echo $db->queryTime(); ?></div> <?php } ?> <!--eof- parse time display --> <!--bof- banner #6 display --> <?php if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) { if ($banner->RecordCount()<div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
So where do I stick the required code? :lamo:
Thanks for your help.
Totally Zenned
i put mine at the bottom of tpl_footer.php .. it just needs to be at the lower end of the page somewhere
Totally Zenned
I've put this:
<?php include($template->get_template_dir('tpl_footer_googleanalytics.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer_googleanalytics.php'); ?>on includes/templates/my_template/common/tpl_footer.php
after the last ?>
I'm clear?
Totally Zenned
100asa:
I've put this:
<?php include($template->get_template_dir('tpl_footer_googleanalytics.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer_googleanalytics.php'); ?>on includes/templates/my_template/common/tpl_footer.php
after the last ?>
I'm clear?
I think thats where I put mine as well.. should be alright
Deceased
Hi getyourgameshere.com,
getyourgameshere.com:
on line 45.. try changing
number_format($products->fields['final_price'], 2, ',', '')
>
> to
>
> ```
number_format($products->fields['final_price'], 2, '.', ',')
to
number_format($products->fields['final_price'], 3, '.', '')
Totally Zenned
Just downloaded/installed Andrew's latest version v.1.21 on Zen Cart 1.36. Installed "variant_javascript" version. EASY install!
And after configuring everything (in Zen Cart admin > Configuration and also in Google Analytics account settings) I viewed the source of the shop home page and observed near the bottom:
<div style="position: absolute; top: -1000px; left: -1000px;"><span class="ygtvtn"> </span><span class="ygtvtm"> </span><span class="ygtvtmh"> </span><span class="ygtvtp"> </span><span class="ygtvtph"> </span><span class="ygtvln"> </span><span class="ygtvlm"> </span><span class="ygtvlmh"> </span><span class="ygtvlp"> </span><span class="ygtvlph"> </span><span class="ygtvloading"> </span></div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = 'UA-XXXXXXX-1';
urchinTracker();
</script>
</body>
Does anyone have a clue what the source would be of all the strange span classes and non-breaking spaces would be from? Is this from the Google Analytics Integration mod?
BTW it is easy to forget...
In Admin > Configuration > Google Analytics Integration > Analytics Account
Be sure to append a "-1" to the end of your account number (or whatever the number of the profile you set up in your GA account settings).
Woody
Totally Zenned
a_berezin:
Hi getyourgameshere.com,
to
number_format($products->fields['final_price'], 3, '.', '')
Ah.. I knew I had messed up somewhere. Thanks Andrew!
Deceased
And replace it on 2 lines!
Totally Zenned
a_berezin:
And replace it on 2 lines!
For anyone else interested.. its lines 31 and 45
Zen Follower
I've downloaded the mod., read the forum and readme file. I'm still rather confused as to its installation. > Woodymon:
Just downloaded/installed Andrew's latest version v.1.21 on Zen Cart 1.36. Installed "variant_javascript" version. EASY install!
The quote above seems to indicate that only the files in variant_javascript folders are required. But the readme file states:
1.1. ONLY FOR variant_include. Edit tpl_footer.php or tpl_main_page.php or any other that you want...
So do I copy ALL the files in the following folders:
includes/...
variant_include/...
variant_javascript/...
(changing "YOUR_TEMPLATE" to my own template directory accordingly) or do I just copy the files in the includes/... folder?
TIA
Fields marked required must be completed.
Tell staff why this post should be reviewed.