Giter VIP home page Giter VIP logo

codeigniter-google-analytics-library's People

Contributors

philippe-actarus avatar pierre-r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

codeigniter-google-analytics-library's Issues

Graph

Is there any way to use graph rather than table?

Token invalid

Hi,

I'm trying to use your library but it is returning the following error:

An Error Was Encountered
Google Analytics Api Library:

Token invalid
Error 401

I checked my config file and my credentials are right. Any suggestion on how to fix this?

Thank you very much!

All functions return error.

I might just be doing something incorrectly... but all the views I try to use result in the error: Google Analytics Api Library: GDatainvalidParameterValueInvalid value for ids parameter: ga:

Any ideas? I have all the config data filled out as directed.

Creating default object from empty value

Salut,

Tout d'abord, super lib !

Par contre, maintenant, avec PHP 5.4 on a un warning assez facile à corriger, il s'agit du titre de cette issue.

Severity: Warning Message: Creating default object from empty value Filename: libraries/ga_api.php Line Number: 553

Pour corriger ça, il suffit d'initialiser l'objet avec stdClass() :

Chercher

function _array_to_object($array) 
    {
        foreach ($array as $key => $value) 
        {
            $object->$key = is_array($value) ? $this->_array_to_object($value) : $value;
        }
        return  $object;
    }

Remplacer par

function _array_to_object($array) 
    {
        $object = new stdClass();
        foreach ($array as $key => $value) 
        {
            $object->$key = is_array($value) ? $this->_array_to_object($value) : $value;
        }
        return  $object;
    }

Tant que j'y suis, une petite amélioration pour le dossier cache : s'il n'existe pas, il ne sera jamais créé et donc le cache jamais utilisé... c'est pas vraiment cool :/
Pour corriger ça, chercher :

function _store_data()
    {
        if (file_exists($this->cache_folder) && is_dir($this->cache_folder))
        {   
            if ($this->cache_data) 
            {
                $file = fopen($this->cache_folder.md5($this->query_string).'.'.$this->cache_ext, 'w');
                fwrite($file, $this->data_file);
            }
            return true;
        }
        return false;
    }

Remplacer par

function _store_data()
    {
        if (file_exists($this->cache_folder) && is_dir($this->cache_folder))
        {   
            if ($this->cache_data) 
            {
                $file = fopen($this->cache_folder.md5($this->query_string).'.'.$this->cache_ext, 'w');
                fwrite($file, $this->data_file);
            }
            return true;
        } else {
            mkdir($this->cache_folder, 0755, TRUE);
        }
        return false;
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.