Documentation

TemplatesPluginIntegrations
in package

Provide native integrations to known plugins which are associated to a template.

Example: RankMath SEO: Deactivate Analytics template when the "Install code" option is activated.

Table of Contents

Constants

ADD_MAIN_URL_TO_SCAN_QUEUE_WHEN_OPTION_CHANGES  = [self::OPTION_NAME_SEOPRESS_GOOGLE_ANALYTICS]
INVALIDATE_WHEN_OPTION_CHANGES  = [self::OPTION_NAME_USERS_CAN_REGISTER, self::OPTION_NAME_RANK_MATH_GA, self::OPTION_NAME_ANALYTIFY_AUTHENTICATION, self::OPTION_NAME_ANALYTIFY_PROFILE, self::OPTION_NAME_ANALYTIFY_GOOGLE_TOKEN, self::OPTION_NAME_EXACTMETRICS_SITE_PROFILE, self::OPTION_NAME_MONSTERINSIGHTS_SITE_PROFILE, self::OPTION_NAME_GA_GOOGLE_ANALYTICS, self::OPTION_NAME_GA_GOOGLE_ANALYTICS_PRO, self::OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS, self::OPTION_NAME_WP_PIWIK, self::OPTION_NAME_MATOMO_PLUGIN, self::OPTION_NAME_PERFMATTERS_GA, self::OPTION_NAME_JETPACK_SITE_STATS, self::OPTION_NAME_WOOCOMMERCE_GEOLOCATION, self::OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS_PRO_ACCOUNT_ID, self::OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS_PRO_SETTINGS, self::OPTION_NAME_WOOCOMMERCE_FEATURE_ORDER_ATTRIBUTION]
INVALIDATE_WHEN_SITE_OPTION_CHANGES  = [self::OPTION_NAME_EXACTMETRICS_NETWORK_PROFIL, self::OPTION_NAME_MONSTERINSIGHTS_NETWORK_PROFIL]
OPTION_NAME_ANALYTIFY_AUTHENTICATION  = 'wp-analytify-authentication'
OPTION_NAME_ANALYTIFY_GOOGLE_TOKEN  = 'pa_google_token'
OPTION_NAME_ANALYTIFY_PROFILE  = 'wp-analytify-profile'
OPTION_NAME_EXACTMETRICS_NETWORK_PROFIL  = 'exactmetrics_network_profile'
OPTION_NAME_EXACTMETRICS_SITE_PROFILE  = 'exactmetrics_site_profile'
OPTION_NAME_GA_GOOGLE_ANALYTICS  = 'gap_options'
OPTION_NAME_GA_GOOGLE_ANALYTICS_PRO  = 'gapro_configure'
OPTION_NAME_JETPACK_SITE_STATS  = 'stats_options'
OPTION_NAME_MATOMO_PLUGIN  = 'matomo-global-option'
OPTION_NAME_MONSTERINSIGHTS_NETWORK_PROFIL  = 'monsterinsights_network_profile'
OPTION_NAME_MONSTERINSIGHTS_SITE_PROFILE  = 'monsterinsights_site_profile'
OPTION_NAME_PERFMATTERS_GA  = 'perfmatters_options'
OPTION_NAME_RANK_MATH_GA  = 'rank_math_google_analytic_options'
OPTION_NAME_SEOPRESS_GOOGLE_ANALYTICS  = 'seopress_google_analytics_option_name'
OPTION_NAME_USERS_CAN_REGISTER  = 'users_can_register'
OPTION_NAME_WOOCOMMERCE_FEATURE_ORDER_ATTRIBUTION  = 'woocommerce_feature_order_attribution_enabled'
OPTION_NAME_WOOCOMMERCE_GEOLOCATION  = 'woocommerce_default_customer_address'
OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS  = 'woocommerce_google_analytics_settings'
OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS_PRO_ACCOUNT_ID  = 'wc_google_analytics_pro_account_id'
OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS_PRO_SETTINGS  = 'woocommerce_google_analytics_pro_settings'
OPTION_NAME_WP_PIWIK  = 'wp-piwik_global-track_mode'
SLUG_ANALYTIFY_FREE  = 'wp-analytify'
SLUG_ANALYTIFY_PRO  = 'wp-analytify-pro'
SLUG_EXACTMETRICS_FREE  = 'google-analytics-dashboard-for-wp'
SLUG_EXACTMETRICS_PRO  = 'exactmetrics-premium'
SLUG_EXACTMETRICS_PRO_LEGACY  = 'google-analytics-dashboard-for-wp-premium'
SLUG_GA_GOOGLE_ANALYTICS_FREE  = 'ga-google-analytics'
SLUG_GA_GOOGLE_ANALYTICS_PRO  = 'ga-google-analytics-pro'
SLUG_MATOMO_PLUGIN  = 'matomo'
SLUG_MONSTERINSIGHTS_FREE  = 'google-analytics-for-wordpress'
SLUG_MONSTERINSIGHTS_PRO  = 'google-analytics-premium'
SLUG_PERFMATTERS  = 'perfmatters'
SLUG_RANKMATH_SEO_FREE  = 'seo-by-rank-math'
SLUG_RANKMATH_SEO_PRO  = 'seo-by-rank-math-pro'
SLUG_WOOCOMMERCE_GOOGLE_ANALYTICS_FREE  = 'woocommerce-google-analytics-integration'
SLUG_WOOCOMMERCE_GOOGLE_ANALYTICS_PRO  = 'woocommerce-google-analytics-pro'
SLUG_WP_PIWIK  = 'wp-piwik'

Properties

$me  : TemplatesPluginIntegrations
Singleton instance.

Methods

getInstance()  : mixed
Get singleton instance.
init()  : mixed
Initialize update hooks. Do this at the earliest `init` action with `priority=0` as other plugins could read options already in `init` action.
middleware_blocker_recommended()  : mixed
Automatically set the `recommended` attribute to `true` for some special cases.
middleware_cookies_recommended()  : mixed
Automatically set the `recommended` attribute to `true` for some special cases.
serverSideConsentInjection_option_woocommerce_default_customer_address()  : mixed
See `serverSideConsentInjection`.
templates_blocker_recommended()  : mixed
Check if blocker is recommended by native integrations of plugins we know.
templates_cookies_recommended()  : mixed
Check if cookie is recommended by native integrations of plugins we know.
templates_plugin_false_positives()  : mixed
Check multiple plugins for native integration.
__construct()  : mixed
C'tor.
serverSideConsentInjection()  : mixed
Server-side inject into plugins via filters and check for consent.

Constants

ADD_MAIN_URL_TO_SCAN_QUEUE_WHEN_OPTION_CHANGES

public mixed ADD_MAIN_URL_TO_SCAN_QUEUE_WHEN_OPTION_CHANGES = [self::OPTION_NAME_SEOPRESS_GOOGLE_ANALYTICS]

INVALIDATE_WHEN_OPTION_CHANGES

public mixed INVALIDATE_WHEN_OPTION_CHANGES = [self::OPTION_NAME_USERS_CAN_REGISTER, self::OPTION_NAME_RANK_MATH_GA, self::OPTION_NAME_ANALYTIFY_AUTHENTICATION, self::OPTION_NAME_ANALYTIFY_PROFILE, self::OPTION_NAME_ANALYTIFY_GOOGLE_TOKEN, self::OPTION_NAME_EXACTMETRICS_SITE_PROFILE, self::OPTION_NAME_MONSTERINSIGHTS_SITE_PROFILE, self::OPTION_NAME_GA_GOOGLE_ANALYTICS, self::OPTION_NAME_GA_GOOGLE_ANALYTICS_PRO, self::OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS, self::OPTION_NAME_WP_PIWIK, self::OPTION_NAME_MATOMO_PLUGIN, self::OPTION_NAME_PERFMATTERS_GA, self::OPTION_NAME_JETPACK_SITE_STATS, self::OPTION_NAME_WOOCOMMERCE_GEOLOCATION, self::OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS_PRO_ACCOUNT_ID, self::OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS_PRO_SETTINGS, self::OPTION_NAME_WOOCOMMERCE_FEATURE_ORDER_ATTRIBUTION]

INVALIDATE_WHEN_SITE_OPTION_CHANGES

public mixed INVALIDATE_WHEN_SITE_OPTION_CHANGES = [self::OPTION_NAME_EXACTMETRICS_NETWORK_PROFIL, self::OPTION_NAME_MONSTERINSIGHTS_NETWORK_PROFIL]

OPTION_NAME_ANALYTIFY_AUTHENTICATION

public mixed OPTION_NAME_ANALYTIFY_AUTHENTICATION = 'wp-analytify-authentication'

OPTION_NAME_EXACTMETRICS_NETWORK_PROFIL

public mixed OPTION_NAME_EXACTMETRICS_NETWORK_PROFIL = 'exactmetrics_network_profile'

OPTION_NAME_EXACTMETRICS_SITE_PROFILE

public mixed OPTION_NAME_EXACTMETRICS_SITE_PROFILE = 'exactmetrics_site_profile'

OPTION_NAME_MONSTERINSIGHTS_NETWORK_PROFIL

public mixed OPTION_NAME_MONSTERINSIGHTS_NETWORK_PROFIL = 'monsterinsights_network_profile'

OPTION_NAME_MONSTERINSIGHTS_SITE_PROFILE

public mixed OPTION_NAME_MONSTERINSIGHTS_SITE_PROFILE = 'monsterinsights_site_profile'

OPTION_NAME_SEOPRESS_GOOGLE_ANALYTICS

public mixed OPTION_NAME_SEOPRESS_GOOGLE_ANALYTICS = 'seopress_google_analytics_option_name'

OPTION_NAME_WOOCOMMERCE_FEATURE_ORDER_ATTRIBUTION

public mixed OPTION_NAME_WOOCOMMERCE_FEATURE_ORDER_ATTRIBUTION = 'woocommerce_feature_order_attribution_enabled'

OPTION_NAME_WOOCOMMERCE_GEOLOCATION

public mixed OPTION_NAME_WOOCOMMERCE_GEOLOCATION = 'woocommerce_default_customer_address'

OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS

public mixed OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS = 'woocommerce_google_analytics_settings'

OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS_PRO_ACCOUNT_ID

public mixed OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS_PRO_ACCOUNT_ID = 'wc_google_analytics_pro_account_id'

OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS_PRO_SETTINGS

public mixed OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS_PRO_SETTINGS = 'woocommerce_google_analytics_pro_settings'

SLUG_EXACTMETRICS_PRO_LEGACY

public mixed SLUG_EXACTMETRICS_PRO_LEGACY = 'google-analytics-dashboard-for-wp-premium'

SLUG_WOOCOMMERCE_GOOGLE_ANALYTICS_FREE

public mixed SLUG_WOOCOMMERCE_GOOGLE_ANALYTICS_FREE = 'woocommerce-google-analytics-integration'

SLUG_WOOCOMMERCE_GOOGLE_ANALYTICS_PRO

public mixed SLUG_WOOCOMMERCE_GOOGLE_ANALYTICS_PRO = 'woocommerce-google-analytics-pro'

Properties

Methods

init()

Initialize update hooks. Do this at the earliest `init` action with `priority=0` as other plugins could read options already in `init` action.

public init() : mixed

Automatically set the `recommended` attribute to `true` for some special cases.

public middleware_blocker_recommended(array<string|int, mixed> &$template) : mixed
Parameters
$template : array<string|int, mixed>

Automatically set the `recommended` attribute to `true` for some special cases.

public middleware_cookies_recommended(array<string|int, mixed> &$template) : mixed
Parameters
$template : array<string|int, mixed>

serverSideConsentInjection_option_woocommerce_default_customer_address()

See `serverSideConsentInjection`.

public serverSideConsentInjection_option_woocommerce_default_customer_address(string $set_default_location_to) : mixed
Parameters
$set_default_location_to : string

Check if blocker is recommended by native integrations of plugins we know.

public templates_blocker_recommended(bool $recommended, string $identifier) : mixed
Parameters
$recommended : bool
$identifier : string

Check if cookie is recommended by native integrations of plugins we know.

public templates_cookies_recommended(bool $recommended, string $identifier) : mixed
Parameters
$recommended : bool
$identifier : string

templates_plugin_false_positives()

Check multiple plugins for native integration.

public templates_plugin_false_positives(bool $isActive, string $plugin, string $identifier, string $type) : mixed
Parameters
$isActive : bool
$plugin : string
$identifier : string
$type : string

serverSideConsentInjection()

Server-side inject into plugins via filters and check for consent.

protected serverSideConsentInjection() : mixed

        
On this page

Search results