$page ); if ( $tab ) { $args['tab'] = $tab; } if ( $action ) { $args['action'] = $action; } $args = array_merge( $args, $extra ); return add_query_arg( $args, admin_url( 'admin.php' ) ); } function getCurrentAdminPage() { if(!empty($_GET['page'])) { return sanitize_text_field($_GET['page']); } return ''; } function getCurrentAdminTab() { if(!empty( $_GET['tab'] ) ) { return sanitize_text_field($_GET['tab']); } return 'general'; } function getCurrentAdminAction() { if(!empty( $_GET['action'] ) ) { return sanitize_text_field($_GET['action']); } return ''; } function getAdminPrimaryNavTabs() { $tabs = array( 'general' => array( 'url' => buildAdminUrl( 'pixelyoursite' ), 'name' => 'Dashboard', ), 'events' => array( 'url' => buildAdminUrl( 'pixelyoursite', 'events' ), 'name' => 'Events', ), ); if ( isWooCommerceActive() ) { $tabs['woo'] = array( 'url' => buildAdminUrl( 'pixelyoursite', 'woo' ), 'name' => 'WooCommerce', ); } if ( isEddActive() ) { $tabs['edd'] = array( 'url' => buildAdminUrl( 'pixelyoursite', 'edd' ), 'name' => 'EasyDigitalDownloads', ); } if ( isWcfActive() ) { $tabs['wcf'] = array( 'url' => buildAdminUrl( 'pixelyoursite', 'wcf' ), 'name' => 'CartFlows', ); } $tabs[ 'head_footer' ] = array( 'url' => buildAdminUrl( 'pixelyoursite', 'head_footer' ), 'name' => 'Head & Footer', ); $tabs['gdpr'] = array( 'url' => buildAdminUrl( 'pixelyoursite', 'gdpr' ), 'name' => 'Consent', ); return $tabs; } function getAdminSecondaryNavTabs() { $tabs = array( 'facebook_settings' => array( 'url' => buildAdminUrl( 'pixelyoursite', 'facebook_settings' ), 'name' => 'Meta Settings', 'pos' => 5, 'icon' => PYS_FREE_URL . '/dist/images/meta-logo.svg' ), 'google_tags_settings' => array( 'url' => buildAdminUrl( 'pixelyoursite', 'google_tags_settings' ), 'name' => 'Google Tags Settings', 'pos' => 10, 'icon' => PYS_FREE_URL . '/dist/images/google-tags-logo.svg' ), 'gtm_tags_settings' => array( 'url' => buildAdminUrl( 'pixelyoursite', 'gtm_tags_settings' ), 'name' => 'GTM Tag Settings', 'pos' => 15, 'icon' => PYS_FREE_URL . '/dist/images/gtm-logo.svg' ), ); $tabs = apply_filters( 'pys_admin_secondary_nav_tabs', $tabs ); $tabs['superpack_settings'] = array( 'url' => buildAdminUrl( 'pixelyoursite', 'superpack_settings' ), 'name' => 'Super Pack Settings', 'pos' => 30, 'icon' => PYS_FREE_URL . '/dist/images/superpack-logo.svg' ); $tabs['hooks'] = array( 'url' => buildAdminUrl( 'pixelyoursite', 'hooks' ), 'name' => 'Filter & Hook List', 'pos' => 50, 'icon' => PYS_FREE_URL . '/dist/images/filter-icon.svg' ); $tabs['logs'] = array( 'url' => buildAdminUrl( 'pixelyoursite', 'logs' ), 'name' => 'Logs', 'pos' => 60, 'icon' => PYS_FREE_URL . '/dist/images/logs-icon.svg' ); uasort($tabs,function ($first,$second){ $firstIndex = isset($first['pos']) ? $first['pos'] : 30; $secondIndex = isset($second['pos']) ? $second['pos'] : 30; return $firstIndex - $secondIndex; }); return $tabs; } function cardCollapseBtn($attr = "", $icon = "icon-shevron-down") { echo ''; } function cardCollapseSettings() { ?> getSlug() . '_' . esc_attr( $key ) . '_panel"'; } function manageAdminPermissions() { global $wp_roles; $roles = PYS()->getOption( 'admin_permissions', array( 'administrator' ) ); foreach ( $wp_roles->roles as $role => $options ) { if ( in_array( $role, $roles ) ) { $wp_roles->add_cap( $role, 'manage_pys' ); } else { $wp_roles->remove_cap( $role, 'manage_pys' ); } } } function renderExternalHelpIcon( $url ) { ?> deleteCache(); } } elseif ( function_exists( 'sg_cachepress_purge_cache' ) ) { sg_cachepress_purge_cache(); } if(isRealCookieBannerPluginActivated()){ wp_rcb_invalidate_templates_cache(); } } function adminIncompatibleVersionNotice( $pluginName, $minVersion ) { ?>

You are using incompatible version of . PixelYourSite requires at least . Please, update to latest version.

getOption('server_access_api_token'); if(Facebook()->enabled() && !$apiTokens) { $meta_key = 'pys_notice_dont_CAPI_start_delay'; $user_id = get_current_user_id(); $start_delay = get_option( $meta_key ) ?? get_user_meta( $user_id, $meta_key ); $day_ago = time() - DAY_IN_SECONDS; if($start_delay && $start_delay > $day_ago) { adminRenderNotCAPI(PYS()); } else if(!$start_delay){ update_option($meta_key, time()); } } if ( isPinterestActive( false ) && isPinterestVersionIncompatible() ) { adminIncompatibleVersionNotice( 'PixelYourSite Pinterest Add-On', PYS_FREE_PINTEREST_MIN_VERSION ); } elseif ( isPinterestActive() ) { $expire_at = Pinterest()->getOption( 'license_expires' ); if ( $expire_at && $now > $expire_at ) { adminRenderLicenseExpirationNotice( Pinterest() ); } } if ( isBingActive( false ) && isBingVersionIncompatible() ) { adminIncompatibleVersionNotice( 'PixelYourSite Bing Add-On', PYS_FREE_BING_MIN_VERSION ); } elseif ( isBingActive() ) { $expire_at = Bing()->getOption( 'license_expires' ); if ( $expire_at && $now > $expire_at ) { adminRenderLicenseExpirationNotice( Bing() ); } } /** * Pixel ID notices */ $facebook_pixel_id = Facebook()->getPixelIDs() ; if ( Facebook()->enabled() && empty( $facebook_pixel_id ) ) { $no_facebook_pixels = true; } else { $no_facebook_pixels = false; } $ga_tracking_id = GA()->getPixelIDs() ; $noticeRenderNotSupportUA = false; if ( GA()->enabled() && empty( $ga_tracking_id ) ) { $no_ga_pixels = true; } else { $no_ga_pixels = false; if (!isGaV4($ga_tracking_id)) { $noticeRenderNotSupportUA = true; } } if(GA()->enabled() && $noticeRenderNotSupportUA){ adminRenderNotSupportUA($noticeRenderNotSupportUA); } $no_pinterest_pixels = false; if ( isPinterestActive() ) { $pinterest_pixel_id = Pinterest()->getOption( 'pixel_id' ); $pinterest_license_status = Pinterest()->getOption( 'license_status' ); if ( Pinterest()->enabled() && ! empty( $pinterest_license_status ) // license active or was active before && empty( $pinterest_pixel_id )){ $no_pinterest_pixels = true; } if ( $no_facebook_pixels && $no_ga_pixels && $no_pinterest_pixels ) { adminRenderNoPixelsNotice(); } else { if ( $no_facebook_pixels ) { adminRenderNoPixelNotice( Facebook() ); } if ( $no_ga_pixels ) { adminRenderNoPixelNotice( GA() ); } if ( $no_pinterest_pixels ) { adminRenderNoPixelNotice( Pinterest() ); } } // show notice if licence was never activated if (Pinterest()->enabled() && empty($pinterest_license_status)) { adminRenderActivatePinterestLicence(); } } else { if ( $no_facebook_pixels && $no_ga_pixels ) { adminRenderNoPixelsNotice(); } else { if ( $no_facebook_pixels ) { adminRenderNoPixelNotice( Facebook() ); } if ( $no_ga_pixels ) { adminRenderNoPixelNotice( GA() ); } } } if ( isBingActive() ) { $bing_license_status = Bing()->getOption( 'license_status' ); // show notice if licence was never activated if (Bing()->enabled() && empty($bing_license_status)) { adminRenderActivateBingLicence(); } } /** * GDPR */ if ( isCookieLawInfoPluginActivated() && ! PYS()->getOption( 'gdpr_ajax_enabled' ) ) { adminGdprAjaxNotEnabledNotice(); } } /** * @param Plugin|Settings $plugin */ function adminRenderLicenseExpirationNotice( $plugin ) { if ( 'pixelyoursite' == getCurrentAdminPage() ) { return; // do not show notice on plugin pages } $slug = $plugin->getSlug(); $user_id = get_current_user_id(); // show only if never dismissed or dismissed more than a week ago $meta_key = 'pys_' . $slug . '_expiration_notice_dismissed_at'; $dismissed_at = get_option($meta_key) ?? get_user_meta( $user_id, $meta_key ); if ( $dismissed_at ) { if ( is_array( $dismissed_at ) ) { $dismissed_at = reset( $dismissed_at ); } $week_ago = time() - WEEK_IN_SECONDS; if ( $week_ago < $dismissed_at ) { return; } } $license_key = $plugin->getOption( 'license_key' ); ?>

Your getPluginName(); ?> license key is expired, so you no longer get any updates. Don't miss our latest improvements and make sure that everything works smoothly.

If you renewed your license but you still see this message, click on the "Reactivate License" button.

Click here to renew your license now

getSlug(); $user_id = get_current_user_id(); // show only if never dismissed or dismissed more than a week ago $meta_key = 'pys_' . $slug . '_CAPI_notice_dismissed_at'; $dismissed_at = get_option( $meta_key ) ?? get_user_meta( $user_id, $meta_key ); if ( $dismissed_at ) { if ( is_array( $dismissed_at ) ) { $dismissed_at = reset( $dismissed_at ); } $week_ago = time() - WEEK_IN_SECONDS; if ( $week_ago < $dismissed_at ) { return; } else { ?>

PixelYourSite Tip: Don't forget to enable Meta Conversion API events. They can improve your ads performance and conversion tracking. Watch this video to learn how: watch the video.

PixelYourSite Tip: Improve your Meta Ads conversion tracking and performance with Conversion API events. Simply add your token to enable CAPI. Watch this video to learn how to do it: watch the video.

Activate your Pinterest add-on license: click here.

Activate your PixelYourSite Microsoft UET (Bing) add-on license: click here.

You have no pixel configured with PixelYourSite. You can add the Meta Pixel (formerly Facebook Pixel), Google Analytics or the Pinterest Tag. Start tracking everything now

PixelYourSite Tip: The old Universal Analytics properties are not supported by Google Analytics anymore. You must use the new GA4 properties instead. Watch this video to find how to get your GA4 tag.

getSlug(); $user_id = get_current_user_id(); // do not show dismissed notice $meta_key = 'pys_' . $slug . '_no_pixel_dismissed_at'; $dismissed_at = get_option( $meta_key ) ?? get_user_meta( $user_id, $meta_key ); if ( $dismissed_at ) { return; } ?>

Add your Meta Pixel (formerly Facebook Pixel) ID and start tracking everything with PixelYourSite. Click Here

Add your Google Analytics tracking ID inside PixelYourSite and start tracking everything. Enhanced Ecommerce is fully supported for WooCommerce or Easy Digital Downloads. Click Here

(If you use another Google Analytics plugin, disable it in order to avoid conflicts)

Add your Google Analytics ID inside PixelYourSite and start tracking everything. Click Here

(If you use another Google Analytics plugin, disable it in order to avoid conflicts)

Add your Pinterest pixel ID and start tracking everything with PixelYourSite. Click Here

disabled="disabled" class="custom-switch-input custom-switch-input">
/>

Add conversion label

'.$label.' '; } function renderEventSetupToolBadge( $label = 'Event Setup Tool' ) { $url = 'https://www.pixelyoursite.com/strategy/pixelyoursite-est/?utm_source=pys-free-plugin&utm_medium=EST-badge&utm_campaign=EST-badge'; echo ' ' . esc_html( $label ) . ' '; } function renderCogBadge( $label = "You need this plugin" ) { $url = 'https://www.pixelyoursite.com/plugins/woocommerce-cost-of-goods'; echo ' '.$label.' '; } function renderSpBadge() { echo ' PRO Feature'; } function renderHfBadge() { echo ' PRO Feature'; } function addMetaTagFields($pixel,$url) { ?>

Verify your domain:

render_text_input_array_item( 'verify_meta_tag', 'Add the verification meta-tag there' ); ?>
Learn how to verify your domain
getOption( 'verify_meta_tag' ); foreach ( $metaTags as $index => $val ) : if ( $index == 0 ) continue; ?>
render_text_input_array_item( 'verify_meta_tag', 'Add the verification meta-tag there', $index ); ?>
'manual_'.$event->transformTitle($_POST['title']) ) ); }else { wp_send_json_error("Title not found"); } } function renderWarningMessage( $message ) { ?>