Changeset 105417 in spip-zone


Ignore:
Timestamp:
Jul 21, 2017, 12:50:35 PM (2 years ago)
Author:
pierrekuhn82@…
Message:

Version 0.5.0 : On rajoute une lecture des 2 cookies géré par https://contrib.spip.net/CookieChoices et https://contrib.spip.net/cookiebar afin de couper les stats de google.

Location:
_plugins_/google_analytics/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/google_analytics/trunk/googleanalytics_insert_head.php

    r88206 r105417  
    1212 * @return string
    1313 */
    14 function googleanalytics_insert_head_css($flux){
    15         return googleanalytics_snippet().$flux;
     14function googleanalytics_insert_head_css($flux) {
     15        return $flux . googleanalytics_snippet();
    1616}
    1717
     
    2323 * @return string
    2424 */
    25 function googleanalytics_insert_head($flux){
     25function googleanalytics_insert_head($flux) {
    2626        return $flux . googleanalytics_snippet();
    2727}
     
    3434        include_spip('inc/config');
    3535        $id_google = lire_config('googleanalytics/idGoogle');
     36        $cookiebar = $_COOKIE["cb-enabled"];
     37        $displayCookieConsent = $_COOKIE["displayCookieConsent"];
    3638        if ($id_google
    3739          AND $id_google !== '_'
    38           AND (strncmp($id_google,"UA-xxx",6)!=0)) {
     40          AND (strncmp($id_google,"UA-xxx",6)!=0)
     41          AND $cookiebar !== 'declined'
     42          AND $displayCookieConsent === 'y') {
    3943            if (lire_config('googleanalytics/ga_universal')) {
    4044                return "<script type='text/javascript'>/*<![CDATA[*/
  • _plugins_/google_analytics/trunk/paquet.xml

    r103720 r105417  
    22        prefix="googleanalytics"
    33        categorie="statistique"
    4         version="0.4.9"
     4        version="0.5.0"
    55        etat="stable"
    66        compatibilite="[1.9.2;3.1.*]"
  • _plugins_/google_analytics/trunk/plugin.xml

    r103720 r105417  
    33        <slogan>Utiliser le service Google Analytics</slogan>
    44        <auteur>Phil</auteur>
    5         <version>0.4.9</version>
     5        <version>0.5.0</version>
    66        <etat>stable</etat>
    77        <licence>GNU/GPL</licence>
Note: See TracChangeset for help on using the changeset viewer.