Search code examples
phpgoogle-analyticspyrocms

Error integrating Google Analytics in PyroCMS


There was no error before i filled up the Google Analytics Setting in the Integration option of Setting menu in Admin Panel. When I submitted the form after filling up the Google Analytics Setting and went to Dashboard, the following error occurred and the graph is not displaying in the Dashboard.

A PHP Error was encountered
Severity: Notice
Message:  Undefined variable: http_response_header
Filename: libraries/Analytics.php
Line Number: 424

A PHP Error was encountered
Severity: Notice
Message:  Undefined variable: http_response_header
Filename: libraries/Analytics.php
Line Number: 427

Please help me with this.


Solution

  • Google analytics uses CURL. In a shared hosting CURL might be disabled, So such problems are likely to occur.