Plugin Directory

Changeset 3199876


Ignore:
Timestamp:
11/30/2024 01:02:14 PM (13 months ago)
Author:
deconf
Message:
  • a new option to set SameSite attribute on Cookie Customization section
Location:
analytics-insights/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • analytics-insights/trunk/admin/settings.php

    r3049315 r3199876  
    3838                $options['ga_force_ssl'] = 0;
    3939                $options['ga_pagescrolldepth_tracking'] = 0;
     40                $options['ga_samesite'] = '';
    4041                $options['tm_pagescrolldepth_tracking'] = 0;
    4142                $options['tm_optout'] = 0;
     
    4748                $options['optimize_tracking'] = 0;
    4849                $options['trackingcode_infooter'] = 0;
    49                 $options['trackingevents_infooter'] = 0;
    5050                if ( isset( $_REQUEST['options']['ga_tracking_code'] ) ) {
    5151                    $new_options['ga_tracking_code'] = trim( $new_options['ga_tracking_code'], "\t" );
     
    612612                <input type="text" id="ga_cookieexpires" name="options[ga_cookieexpires]" value="<?php echo esc_attr($options['ga_cookieexpires']); ?>" size="10">
    613613                                        <?php _e("seconds", 'analytics-insights' ); ?>
     614            </td>
     615        </tr>
     616        <tr>
     617            <td class="aiwp-settings-title">
     618                <label for="ga_samesite"><?php _e("SameSite Attribute:", 'analytics-insights' ); ?></label>
     619            </td>
     620            <td>
     621                <select id="ga_samesite" name="options[ga_samesite]">
     622                    <option value="" <?php selected( $options['ga_samesite'], '' ); ?>><?php _e("Disabled", 'analytics-insights');?></option>
     623                    <option value="Strict" <?php selected( $options['ga_samesite'], 'Strict' ); ?>><?php _e("Strict", 'analytics-insights');?></option>
     624                    <option value="Lax" <?php selected( $options['ga_samesite'], 'Lax' ); ?>><?php _e("Lax", 'analytics-insights');?></option>
     625                    <option value="None" <?php selected( $options['ga_samesite'], 'None' ); ?>><?php _e("None", 'analytics-insights');?></option>
     626                </select>
    614627            </td>
    615628        </tr>
  • analytics-insights/trunk/analytics-insights.php

    r3155545 r3199876  
    55 * Description: Displays Google Analytics Reports and Real-Time Statistics in your Dashboard. Automatically inserts the tracking code in every page of your website.
    66 * Author: DeConf
    7  * Version: 6.3.8
     7 * Version: 6.3.9
    88 * Author URI: https://deconf.com
    99 * Text Domain: analytics-insights
     
    1515// Plugin Version
    1616if ( ! defined( 'AIWP_CURRENT_VERSION' ) ) {
    17     define( 'AIWP_CURRENT_VERSION', '6.3.8' );
     17    define( 'AIWP_CURRENT_VERSION', '6.3.9' );
    1818}
    1919if ( ! defined( 'AIWP_ENDPOINT_URL' ) ) {
  • analytics-insights/trunk/config.php

    r3049315 r3199876  
    128128                            'ecommerce_mode',
    129129                            'tracking_type',
     130                            'ga_samesite',
    130131            );
    131132            foreach ( $texts as $key ) {
     
    412413            }
    413414
     415            if ( ! isset( $this->options['ga_samesite'] ) ) { // v6.3.9
     416                $this->options['ga_samesite'] = '';
     417                $flag = true;
     418            }
     419
    414420            if ( '' == $this->options['ga_target_geomap'] ) {
    415421                $this->options['ga_target_geomap'] = 'None';
  • analytics-insights/trunk/front/tracking-analytics.php

    r2998407 r3199876  
    252252                $fieldsobject['cookie_expires'] = (int) $this->aiwp->config->options['ga_cookieexpires'];
    253253            }
     254
     255            switch ( $this->aiwp->config->options['ga_samesite'] ) { // make sure we have a valid request
     256                case 'Strict' :
     257                    $fieldsobject['cookie_flags'] = 'SameSite=Strict';
     258                    break;
     259                case 'Lax' :
     260                    $fieldsobject['cookie_flags'] = 'SameSite=Lax';
     261                    break;
     262                case 'None' :
     263                    $fieldsobject['cookie_flags'] = 'SameSite=None;Secure';
     264                    break;
     265            }
     266
    254267            if ( $this->aiwp->config->options['ga_crossdomain_tracking'] && '' != $this->aiwp->config->options['ga_crossdomain_list'] ) {
    255268                $domains = '';
  • analytics-insights/trunk/install/install.php

    r3027339 r3199876  
    5656            $options['ga_cookiename'] = '';
    5757            $options['ga_cookieexpires'] = '';
     58            $options['ga_cookieexpires'] = 'ga_samesite';
    5859            $options['pagetitle_404'] = 'Page Not Found';
    5960            $options['maps_api_key'] = '';
  • analytics-insights/trunk/readme.txt

    r3185927 r3199876  
    55Requires at least: 3.5
    66Tested up to: 6.7
    7 Stable tag: 6.3.8
     7Stable tag: 6.3.9
    88Requires PHP: 5.6
    99License: GPLv2 or later
     
    142142== Changelog ==
    143143
     144= 6.3.9 (2024.11.30) =
     145* Enhancements:
     146    * a new option to set SameSite attribute on Cookie Customization section
     147   
    144148= 6.3.8 (2024.09.21) =
    145149* Bug Fixes:
Note: See TracChangeset for help on using the changeset viewer.