Jump to content

Recommended Posts

Hi guys,

 

I am using prestashop 1.6.0.9 with google analytics module v2.0.7 which is the latest one, I just updated it yesterday.

 

Since a week ago it suddenly appeared on Google Tag Assistant (a chrome add on by Google), shown 1 error message said "No HTTP response detected".

 

If I go to google site, it's written like this:

 

 

Missing HTTP Response
Missing HTTP Response denotes that, while the Google Analytics code was detected in the page source, the script itself did not execute. Each time the Google Analytics script executes, we expect an HTTP Response carrying the tracking request to Google’s servers.
This means that the Google Analytics code is not implemented properly on the page and no data will be collected.
Recommended Action: Reinstall the Google Analytics snippet by removing the current iteration, copy a new version from the Analytics interface, and insert that version into the site.

 

I try to reset the module, it still shown an error like that. Everything was fine until last week. But actually if I open Google Analytics, they still received visitors data from our website. Is it just a false alarm or something?

Edited by rukano (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 2 weeks later...
I solved in this way, visibility of products for page was 30 items for page and this was cause of malfunction of analytics, now i've setting 9 items for page and problem is solved.

 

The customer have the possibility for select a major number of items manually, but usually my shop give visibility of only nine items so, the page is more light and this seem better for analytics, maybe for page less heavy.

 

However with this setting now all work perfectly

Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...

Hey guys,

 

I know the thread is marked as solved but others still had the same issue is seems and I too had the same problem.

 

I have found a simple fix - after seeing that one of my shop was still working while the others weren't. All my shop are on Presta 1.6 but one of them was using an outdated version of the Google Analytics module (version 1.3).

 

I uploaded this old version to my other shops and sure enough the HTTP response error disappeared.

 

Hope this helps others!

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

[sOLVED]

On CCC (Combine compress cache)

> Disable "move javascript to the end" > Make the code working but the became uncorrect...

> Disable "Compress inline javascript to HTML" > If disabled it don't modify the code and everything work!

 

Google Tag assistant (chrome extension) became green! 

 

:D

Edited by Mejaro (see edit history)
  • Like 3
Link to comment
Share on other sites

  • 10 months later...
  • 2 months later...

Hey guys,

 

I know the thread is marked as solved but others still had the same issue is seems and I too had the same problem.

 

I have found a simple fix - after seeing that one of my shop was still working while the others weren't. All my shop are on Presta 1.6 but one of them was using an outdated version of the Google Analytics module (version 1.3).

 

I uploaded this old version to my other shops and sure enough the HTTP response error disappeared.

 

Hope this helps others!

 

Hi do you have a copy of the 1.3 module?

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...

[sOLVED]

On CCC (Combine compress cache)

> Disable "move javascript to the end" > Make the code working but the became uncorrect...

> Disable "Compress inline javascript to HTML" > If disabled it don't modify the code and everything work!

 

Google Tag assistant (chrome extension) became green! 

 

:D

 

Works !!! Thank youu :D

Link to comment
Share on other sites

  • 9 months later...
  • 1 month later...
  • 1 month later...
  • 1 month later...
  • 2 months later...

install the newest version from https://github.com/PrestaShop/ganalytics

if nothing else worked

simply add

	ga('send', 'pageview');

after 

    ga('require', 'ec');

in \apps\prestashop\htdocs\modules\ps_googleanalytics\views\templates\hook\ps_googleanalytics.tpl

Result:

{literal}

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

{/literal}
    {if $gaCrossdomainEnabled}
        ga('create', '{$gaAccountId|escape:'htmlall':'UTF-8'}', 'auto', {literal}{'allowLinker': true}{/literal});
        ga('require', 'linker');
        ga('linker:autoLink', [
        {foreach from=$shops item=shop}
            {if $shop.id_shop != $currentShopId}
            {if $useSecureMode}'{$shop.domain_ssl|escape:'htmlall':'UTF-8'}'{else}'{$shop.domain|escape:'htmlall':'UTF-8'}'{/if},
            {/if}
        {/foreach}
        ]);
    {else}
        ga('create', '{$gaAccountId|escape:'htmlall':'UTF-8'}', 'auto');
    {/if}
    {if $userId && !$backOffice}
        ga('set', 'userId', '{$userId|escape:'htmlall':'UTF-8'}');
    {/if}
    {if $backOffice}
        ga('set', 'nonInteraction', true);
    {/if}
{literal}
    ga('require', 'ec');
	ga('send', 'pageview');
</script>
{/literal}

 

 

Edited by eshizero (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 2 months later...

I followed eshizero suggestion but modified another file and works fine!

This is the file: ganalytics.php in /modules/ganalytics folder

I simply add this line: .((!$back_office) ? 'ga(\'send\', \'pageview\');': '') at line 267

This is the new script

            <script type="text/javascript">
                (window.gaDevIds=window.gaDevIds||[]).push(\'d6YPbH\');
                (function(i,s,o,g,r,a,m){i[\'GoogleAnalyticsObject\']=r;i[r]=i[r]||function(){
                (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
                m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
                })(window,document,\'script\',\'//www.google-analytics.com/analytics.js\',\'ga\');
                ga(\'create\', \''.Tools::safeOutput(Configuration::get('GA_ACCOUNT_ID')).'\', \'auto\');
                ga(\'require\', \'ec\');'
                // 20180827 bugfix for analytcs pageview problem
                .((!$back_office) ? 'ga(\'send\', \'pageview\');': '')
                .(($user_id && !$back_office) ? 'ga(\'set\', \'&uid\', \''.$user_id.'\');': '')
                .($back_office ? 'ga(\'set\', \'nonInteraction\', true);' : '')
            .'</script>';

 

Edited by bazweb (see edit history)
Link to comment
Share on other sites

  • 10 months later...
Quote

On CCC (Combine compress cache)

> Disable "move javascript to the end" > Make the code working but the became uncorrect...

> Disable "Compress inline javascript to HTML" > If disabled it don't modify the code and everything work!

 

Google Tag assistant (chrome extension) became green! 

This solution worked for me!

Thanks a lot

Marilyne

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...