Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Google analytics SQL install error

    Just found this thread and I'm having the same problem (I think).

    When I run the Google Analytics sql (via the admin) I receive the following error message.

    1366 Incorrect integer value: '' for column 'configuration_group_id' at row 1
    in:
    [INSERT INTO zen_configuration_group VALUES ('', 'Google Analytics Configuration', 'Set Google Analytics Options', '1', '1');]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
    Here's the sql that I'm trying to run.

    Code:
    SET @t4=0;
    SELECT (@t4:=configuration_group_id) as t4 
    FROM configuration_group
    WHERE configuration_group_title= 'Google Analytics Configuration';
    DELETE FROM configuration WHERE configuration_group_id = @t4;
    DELETE FROM configuration_group WHERE configuration_group_id = @t4;
    
    INSERT INTO configuration_group VALUES ('', 'Google Analytics Configuration', 'Set Google Analytics Options', '1', '1');
    UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();
    
    SET @t4=0;
    SELECT (@t4:=configuration_group_id) as t4 
    FROM configuration_group
    WHERE configuration_group_title= 'Google Analytics Configuration';
    
    INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Analytics Account', 'GOOGLE_ANALYTICS_UACCT', 'UA-XXXXXX-X', 'Enter your Google Analytics account number', @t4, 1, NOW(), NOW(), NULL, NULL),
    ('', 'Target Address', 'GOOGLE_ANALYTICS_TARGET', 'customers', 'What adress (City/State/Country to correlate the transaction with) use in Analytics transaction?', @t4, 2, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''customers'', ''delivery'', ''billing''),'),
    ('', 'Affiliation', 'GOOGLE_ANALYTICS_AFFILIATION', '', 'Optional partner or store affilation', @t4, 3, NOW(), NOW(), NULL, NULL),
    ('', 'Use sku/code', 'GOOGLE_ANALYTICS_SKUCODE', 'products_id', 'Using as Product SKU code', @t4, 4, now(), now(), NULL, 'zen_cfg_select_option(array(''products_id'', ''products_model''),');
    Anyone know how to fix this?

  2. #12
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Google analytics SQL install error

    Ok, I've fixed the SQL errors. I'm running MySQL 5 and it wasn't liking the empty ('') values. You can find the SQL code that I ran below.

    Code:
    SET @t4=0;
    SELECT (@t4:=configuration_group_id) as t4 
    FROM configuration_group
    WHERE configuration_group_title= 'Google Analytics Configuration';
    DELETE FROM configuration WHERE configuration_group_id = @t4;
    DELETE FROM configuration_group WHERE configuration_group_id = @t4;
    
    INSERT INTO configuration_group VALUES (NULL, 'Google Analytics Configuration', 'Set Google Analytics Options', '1', '1');
    UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();
    
    SET @t4=0;
    SELECT (@t4:=configuration_group_id) as t4 
    FROM configuration_group
    WHERE configuration_group_title= 'Google Analytics Configuration';
    
    INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Analytics Account', 'GOOGLE_ANALYTICS_UACCT', 'UA-XXXXXX-X', 'Enter your Google Analytics account number', @t4, 1, NOW(), NOW(), NULL, NULL),
    (NULL, 'Target Address', 'GOOGLE_ANALYTICS_TARGET', 'customers', 'What adress (City/State/Country to correlate the transaction with) use in Analytics transaction?', @t4, 2, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''customers'', ''delivery'', ''billing''),'),
    (NULL, 'Affiliation', 'GOOGLE_ANALYTICS_AFFILIATION', '', 'Optional partner or store affilation', @t4, 3, NOW(), NOW(), NULL, NULL),
    (NULL, 'Use sku/code', 'GOOGLE_ANALYTICS_SKUCODE', 'products_id', 'Using as Product SKU code', @t4, 4, now(), now(), NULL, 'zen_cfg_select_option(array(''products_id'', ''products_model''),');

  3. #13
    Join Date
    Nov 2006
    Posts
    9
    Plugin Contributions
    0

    Default Re: Google analytics SQL install error

    Miles, you rock. Wonder why this file isn't included in the download?

    Thanks!


    Quote Originally Posted by miles View Post
    Of course, here's the SQL file. Please have a look.

  4. #14
    Join Date
    Nov 2010
    Posts
    14
    Plugin Contributions
    0

    Default Re: Google analytics SQL install error

    I have installed simple Google Analytics v1.2.3 and after working through numerous issues I've hit a brick wall. The last thing I had to do was change the Emty Strings to NULL in the SQL patch like the post above mentioned.

    After I corrected that the Simple Google Analytics configuration pane finally shows up and I input my GA tracking code but when I view the source of the pages.

    The other thing is that currently I have the code set to ga.js because when i tried out the asynchronous tracking code all the homepage loads completly blank.

    I've read that when this happens its usually a PHP error/typo so i went back through the 2 template files I had to modify to verify they were correct. Any input/advice/insite/suggestions you could provide would be most helpful. I've since moved the tracking code back to ga.js but here is what the source of the main page looks like when I set the tracking code to asynchronous:

    [SCR]
    http://www.zen-cart.com eCommerce" />
    <link rel="icon" href="favicon.ico" type="image/x-icon" />
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />

    <base href="http://store.chocolatmoderne.com/" />

    <link rel="stylesheet" type="text/css" href="includes/templates/test/css/stylesheet.css" />

    <link rel="stylesheet" type="text/css" href="includes/templates/test/css/stylesheet_css_buttons.css" />
    <link rel="stylesheet" type="text/css" media="print" href="includes/templates/test/css/print_stylesheet.css" />
    <script type="text/javascript" src="includes/modules/pages/product_info/jscript_textarea_counter.js"></script>
    <script language="javascript" type="text/javascript"><!--
    function popupWindow(url) {
    window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screen X=150,screenY=150,top=150,left=150')
    }
    function popupWindowPrice(url) {
    window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=400,scree nX=150,screenY=150,top=150,left=150')
    }
    //--></script>

    ">
    [/SCR]

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v150 install google analytics
    By anapsolive in forum General Questions
    Replies: 1
    Last Post: 1 May 2013, 04:00 PM
  2. v150 Install SQL Patch Error with Google Feeder
    By expensivedesign in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 29 Jul 2012, 02:53 PM
  3. v150 Simple Google Analytics .sql error !
    By Miff in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 10 Feb 2012, 11:33 PM
  4. Install Google Analytics
    By Fofo's Fudge in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 2 Nov 2011, 03:54 AM
  5. uninstalling SQL patch for Google Analytics, which messed up my cart
    By sruti_geneles in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 20 Jul 2009, 06:35 PM

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