Page 8 of 11 FirstFirst ... 678910 ... LastLast
Results 71 to 80 of 108
  1. #71

    Default Re: Google Ecommerce Tracking with Adwords-Google Tag Manager

    Successfully installed module however the Brand: is not passing to the code in the Successful checkout page. I see the brand displayed on all prior pages before checkout is complete. Any ideas as to why this value would not be passed? See below code that was on the checkout page. It appears everything else passes ok. Not sure if this is a bug with the module or not? I tried it loaded in two other theme templates and still occurs.

    Code:
    ga('require', 'ec');
    ga('require', 'displayfeatures');
    ga('send', 'event', 'Checkout Success' , 'Order#46926','customerID#17551' );
    ga('ec:setAction', 'purchase', { 'id': '46926','affiliation': 'purchaseorder', 'revenue': '67.58', 'tax': '3.58','shipping': '0.00','coupon': 'n/a', 'dimension1': 'customerID#17551' });
    ga('ec:addProduct', {   'id': '208', 'name': 'RS232 Cable', 'brand': 'n/a', 'category': 'Cables', 'variant': 'n/a', 'price':  '67.58', 'quantity': '1', 'coupon': 'n/a', 'position': '0' } );
    ga('send', 'pageview');

  2. #72

    Default Re: Google Ecommerce Tracking with Adwords-Google Tag Manager

    Just tested with New install of Zen 1.5.4 with sampel products. It does pass the brand on checkout page. HOWEVER.. the brand is not accurate. Here is an example of checked out items. You can see they are mismatched.

    Code:
    ga('ec:addProduct', {   'id': '8', 'name': 'A Bug\'s Life Linked', 'brand': 'Microsoft', 'category': 'Cartoons', 'variant': 'n/a', 'price':  '35.99', 'quantity': '1', 'coupon': 'n/a', 'position': '0' } );
    ga('ec:addProduct', {   'id': '105', 'name': 'A Maximum Sample of 1', 'brand': 'Matrox', 'category': 'Big Linked', 'variant': 'n/a', 'price':  '50.00', 'quantity': '1', 'coupon': 'n/a', 'position': '1' } );

  3. #73

    Default Re: Google Ecommerce Tracking with Adwords-Google Tag Manager

    I think I found code bug after trying again for a few hours. This will be my first commit. I submitted problem in Github too as not sure of process. Please double check my work though. Not sure if I should try to submit to zencart. The analytics problem from this is that it causes the brand name only for checked out items to be incorrect. All browsing experience on product pages will record brand properly. In reports though for checked out items in which someone wants to see total sales by brand name it will be incorrect.

    Change line 217 of file in includes/classes/observers/class.ec_analytics.php

    Change below code from "orders_products_id" to "products_id"
    Code:
    $brand = zen_get_products_manufacturers_name($items_in_cart->fields['orders_products_id']);

  4. #74
    Join Date
    Sep 2005
    Location
    Austria
    Posts
    104
    Plugin Contributions
    6

    Default Re: Google Ecommerce Tracking with Adwords-Google Tag Manager

    Quote Originally Posted by jpietrowiak View Post
    I think I found code bug after trying again for a few hours. The analytics problem from this is that it causes the brand name only for checked out items to be incorrect. All browsing experience on product pages will record brand properly. In reports though for checked out items in which someone wants to see total sales by brand name it will be incorrect.

    Change line 217 of file in includes/classes/observers/class.ec_analytics.php

    Change below code from "orders_products_id" to "products_id"
    Code:
    $brand = zen_get_products_manufacturers_name($items_in_cart->fields['orders_products_id']);
    Thanks for reporting this typo preventing the brand name to be recorded!
    Fix confirmed, just submitted an updated 1.2.1 to the download section.

  5. #75
    Join Date
    Jul 2015
    Location
    Warsaw
    Posts
    16
    Plugin Contributions
    0

    Default Re: Google Ecommerce Tracking with Adwords-Google Tag Manager

    hello.
    Currently, Google implements gtag for tracking sites, instead of ga.
    Can this mod be reweiten using this new library?

    Regards
    Meksicus

  6. #76
    Join Date
    May 2016
    Location
    Bucharest
    Posts
    48
    Plugin Contributions
    0

    Default Re: Google Ecommerce Tracking

    Can anyone tel how to anonymise ip with module, where to put the code so that the visitor's ip is anonymised in Google Analytics?
    I read that this code should be inserted in the GA snippet ---- ga('set', 'anonymizeIp', true); --- but not sure where it should go in the EC Analytics Module, and also how to test if it does the job.

    Also, is this module sending user ID information to Google Analytics? We don't want this information to be sent by our website to GA.

    Need these handeled to make our GA GDPR compilant without the need to gather consent from visitors to run GA.

    10x

  7. #77
    Join Date
    Sep 2005
    Location
    Austria
    Posts
    104
    Plugin Contributions
    6

    Default Re: Google Ecommerce Tracking

    To use anomyzizeIP with this plugin:

    includes/templates/YOURTEMPLATE/jscript/jscript_ec_analytics.php

    around line 29
    change from

    Code:
    <?php
    //global $analytics, $cID;
    $cID = (isset($_SESSION['customer_id'])) ? "customerID#".$_SESSION['customer_id']:"guest";
    echo ($cID === "guest") ? "ga('create', '".$trackingID."', 'auto') ;\n":"ga('create', '".$trackingID."', {'userId':'{$cID}'});\n";   
    echo "ga('require', 'ec');\n"; 
    echo "ga('require', 'displayfeatures');\n";
    if (!isset($_SESSION['analytics'])) {  echo "ga('send', 'pageview');\n";}
    to

    Code:
    <?php
    global $analytics, $cID; 
    $cID = (isset($_SESSION['customer_id'])) ? "customerID#".$_SESSION['customer_id']:"guest";
    echo ($cID === "guest") ? "ga('create', '".$trackingID."', 'auto') ;\n":"ga('create', '".$trackingID."', {'userId':'{$cID}'});\n";
    echo "ga('set', 'anonymizeIp', true); \n";     
    echo "ga('require', 'ec');\n"; 
    echo "ga('require', 'displayfeatures');\n";
    if (!isset($_SESSION['analytics'])) {  echo "ga('send', 'pageview');\n";}
    To be GDPR compliant you should also support the GA Opt-Out Cookie:

    Integrate the following link to your privacy policy:

    Code:
    <a onclick="alert('Google Analytics has been disabled');"href="javascript:gaOptout()">Disable Google Analytics</a>
    And integrate the following script somewhere in the head section in includes/templates/YOURTEMPLATE/common/html_header.php
    (Change UA-1234567 to your own ID)

    Code:
    <script type="text/javascript">
    var gaProperty = 'UA-1234567';
    var disableStr = 'ga-disable-' + gaProperty;
    if (document.cookie.indexOf(disableStr + '=true') > -1) { window[disableStr] = true;
    }
    function gaOptout() {
    document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
    window[disableStr] = true; }
    </script>
    The user ID is sent to Google Analytics but this does not contain any personal data so I' m not sure what should not be GDPR compliant doing so.

  8. #78
    Join Date
    May 2016
    Location
    Bucharest
    Posts
    48
    Plugin Contributions
    0

    Default Re: Google Ecommerce Tracking

    Quote Originally Posted by webchills View Post
    To use anomyzizeIP with this plugin:

    includes/templates/YOURTEMPLATE/jscript/jscript_ec_analytics.php

    around line 29
    change from

    Code:
    <?php
    //global $analytics, $cID;
    $cID = (isset($_SESSION['customer_id'])) ? "customerID#".$_SESSION['customer_id']:"guest";
    echo ($cID === "guest") ? "ga('create', '".$trackingID."', 'auto') ;\n":"ga('create', '".$trackingID."', {'userId':'{$cID}'});\n";   
    echo "ga('require', 'ec');\n"; 
    echo "ga('require', 'displayfeatures');\n";
    if (!isset($_SESSION['analytics'])) {  echo "ga('send', 'pageview');\n";}
    to

    Code:
    <?php
    global $analytics, $cID; 
    $cID = (isset($_SESSION['customer_id'])) ? "customerID#".$_SESSION['customer_id']:"guest";
    echo ($cID === "guest") ? "ga('create', '".$trackingID."', 'auto') ;\n":"ga('create', '".$trackingID."', {'userId':'{$cID}'});\n";
    echo "ga('set', 'anonymizeIp', true); \n";     
    echo "ga('require', 'ec');\n"; 
    echo "ga('require', 'displayfeatures');\n";
    if (!isset($_SESSION['analytics'])) {  echo "ga('send', 'pageview');\n";}
    To be GDPR compliant you should also support the GA Opt-Out Cookie:

    Integrate the following link to your privacy policy:

    Code:
    <a onclick="alert('Google Analytics has been disabled');"href="javascript:gaOptout()">Disable Google Analytics</a>
    And integrate the following script somewhere in the head section in includes/templates/YOURTEMPLATE/common/html_header.php
    (Change UA-1234567 to your own ID)

    Code:
    <script type="text/javascript">
    var gaProperty = 'UA-1234567';
    var disableStr = 'ga-disable-' + gaProperty;
    if (document.cookie.indexOf(disableStr + '=true') > -1) { window[disableStr] = true;
    }
    function gaOptout() {
    document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
    window[disableStr] = true; }
    </script>
    The user ID is sent to Google Analytics but this does not contain any personal data so I' m not sure what should not be GDPR compliant doing so.
    Thanks,

    I inserted the code, but how do I test if the ip is indeed anonimysed?
    Also, the disable GA script seems to work but what if the user wants to re enable Google Analytics back, how is this done?

  9. #79
    Join Date
    Sep 2005
    Location
    Austria
    Posts
    104
    Plugin Contributions
    6

    Default Re: Google Ecommerce Tracking

    but how do I test if the ip is indeed anonimysed
    Use Chrome

    Install the Google Analytics Debugger extension
    https://chrome.google.com/webstore/d...hjechhna?hl=en

    Go to your website

    Check the requests sent to Google Analytics, they should have the &aip parameter set to aip=1


    but what if the user wants to re enable Google Analytics back
    He has to delete the Opt-Out Cookie

    Use Firefox Version 60 and above

    Go to your website

    Click on Site Information > Website Security > more info > show cookies
    If the GA Opt-Out Cookie is set you will see:
    ga-disable-UA-12345678-9
    If you delete this cookie GA is "enabled" again

  10. #80
    Join Date
    May 2016
    Location
    Bucharest
    Posts
    48
    Plugin Contributions
    0

    Default Re: Google Ecommerce Tracking

    Quote Originally Posted by webchills View Post
    Use Chrome

    Install the Google Analytics Debugger extension
    https://chrome.google.com/webstore/d...hjechhna?hl=en

    Go to your website

    Check the requests sent to Google Analytics, they should have the &aip parameter set to aip=1




    He has to delete the Opt-Out Cookie

    Use Firefox Version 60 and above

    Go to your website

    Click on Site Information > Website Security > more info > show cookies
    If the GA Opt-Out Cookie is set you will see:
    ga-disable-UA-12345678-9
    If you delete this cookie GA is "enabled" again


    10x so much, appreciate!

 

 
Page 8 of 11 FirstFirst ... 678910 ... LastLast

Similar Threads

  1. Replies: 6
    Last Post: 3 Oct 2013, 10:36 PM
  2. Ecommerce Tracking code for Google Analytics
    By Endre in forum General Questions
    Replies: 7
    Last Post: 14 Nov 2012, 03:20 PM
  3. MailChimp Ecommerce MC360 tracking?
    By irishshopper in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 26 Oct 2010, 11:21 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR