optionshme
Forum Replies Created
-
Forum: Plugins
In reply to: [Autoptimize] fbq is not definedThe offending code was found in the “Custom Code” element of Elementor. Removed and no longer an issue. Thank you!
Forum: Plugins
In reply to: [Autoptimize] fbq is not definedOk, thank you. I will do some more digging and report back in this thread if I find a solution. Thanks for the quick response!
Thanks @threadi it looks like we had another “instance” of the site on our old host. Was not live, but still pushing that notification. The outdated plugin versions mentioned in the email seemed to line up with the time that we switched hosts.
I removed the instance and will monitor to see if this solves the issue. Thanks for pointing me in the right direction!
Submitted, thanks @prashantrai.
I was under the impression that only pro members received direct support. Thanks for the clarification.
Forum: Plugins
In reply to: [Autoptimize] Preload on Page by Page BasisThat did the trick, works great. Thank you for your responsiveness!
Just one little note, there was a parentheses missing after the first “false.” I have added it to the code for anyone who wishes to reference the post at a later date. Thanks again!
add_filter( 'autoptimize_filter_extra_tobepreloaded', 'preload_images' ); function preload_images( $preload_array ) { if ( is_front_page() ) { $preload_array[] = 'https://yoursite.com/wp-content/themes/yourtheme/tobepreloaded.file'; } else if ( strpos($_SERVER['REQUEST_URI'],'/page_123' ) !== false ) { $preload_array[] = 'https://yoursite.com/wp-content/themes/yourtheme/othertobepreloaded.file'; } else if ( strpos($_SERVER['REQUEST_URI'],'/page_abc' ) !== false ) { $preload_array[] = 'https://yoursite.com/wp-content/themes/yourtheme/yetanothertobepreloaded.file'; } return $preload_array; }- This reply was modified 4 years, 7 months ago by optionshme.
Forum: Plugins
In reply to: [Autoptimize] Preload on Page by Page BasisThanks! So, I will replace the file url’s of course, and then the only other thing that needs replacing is the ‘/page_123’ which would be ‘/stair-lift-ad/’ if the url is https://optionshme.com/stair-lift-ad/ correct?
Where should this be placed in the header.php file?
- This reply was modified 4 years, 7 months ago by optionshme.
James, thank you for your patience and detailed responses. Removing the connected site tag was the ticket, the script no longer loads and is not present in Dev tools or PSI. Thank you for your help in resolving this issue.
As a side note for other users, removing the site tag caused the site kit plugin to break my site temporarily. After disabling the plugin via FTP renaming, I was able to remove and reinstall the plugin with no issues. Site kit, analytics, and my site are all functioning normally now.
Thank you for your insight James, that helps narrow things down.
I did enable GA4 briefly, but disabled it shortly after (on Monday). After reading your reply that is was a GA4 script, I completed the following today:
1. Removed GA4 property from Analytics account within analytics.
2. Deleted the only container within GTM.
3. Reset Site Kit
4. Deactivated Site Kit
5. Deleted Site Kit
6. Cleaned Databases
7. Cleared Caches (script no longer showed when tested)
8. Reinstalled Site Kit
9. Connected Analytics via Site Kit (script reappeared at this point)Currently on my analytics account, the GA4 shows as a “Property” under my “Account,” with the GA4 property crossed out with a strikethrough. I do not see an option to further remove it.
It certainly is not the largest opportunity for increasing page speed, but it does have an impact, and I currently do not have use for GA4. Any insights on how to clear the GA4 property off of the account entirely to stop the script from running?
James, thank you for your feedback.
Here is the report you requested, with the script in question still showing up: https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Foptionshme.com%2F
I run Pagespeed Insights and Dev Tools in an incognito browser to eliminate the possibility of being logged in, so I do not believe that is the issue.
Thank you James.
The script is present on both Pagespeed Insights and chrome developer tools. This script was not present on Friday 4/9/21 when I was working on the site. I’m pretty sure it is tied to Site Kit, as when I remove Site Kit and clear caches, it does not appear on PSI or Dev tools anymore.
It has an impact on page load speed, and I am curious as to why it is present, as I see the normal analytics script: https://www.googletagmanager.com/gtag
/js?id=UA-118693464-1 that is tied to our property loading, like it always has been.When I remove Site Kit, then reinstall and reenable it, the new script in question only appears after I connect Analytics.