- This topic has 7 replies, 3 voices, and was last updated 3 years, 8 months ago by
Tom.
-
AuthorPosts
-
August 23, 2018 at 4:20 am #657667
Lee
Hi,
I am trying to add Google Analytics tracking code in to the WP Header using hooks.
I keep getting a 403 error message when trying to save:
403
Forbidden
Access to this resource on the server is denied!Any ideas to what is going wrong?
Lee
GeneratePress 2.1.4GP Premium 1.7.2August 23, 2018 at 8:09 am #657963David
StaffCustomer SupportHi there,
a few things to check:
1. make sure the GA code is linked to the correct google account.
2. #1 here to eliminate plugin conflicts:
https://docs.generatepress.com/article/debugging-tips/3. Check with your host to make sure the htaccess (if used) is not corrupt) and that the File Permissions are correctly set.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 24, 2018 at 2:42 am #658655Lee
Hi David.
Thanks for the response.
I have gone though all points above:
1. Tracking code is for the correct GA account
2. I have deactivated all non GP plugins
3. htaccess is not corrupt.Also probably worth noting i am using hooks for an Elementor header which is working fine – it’s just the GA code that it doesn’t like and still throwing the 403 error when trying to save.
Any further thoughts would be appreciated – i’m stuck on this one.
Kind regards.
Lee
August 24, 2018 at 6:55 am #658831David
StaffCustomer SupportOk, can you check for specific errors in your
error_log
file on your server? It will give us some more insight into what’s going on.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 29, 2018 at 3:16 am #663098Lee
Hi David.
There’s one error in the error log on the server:
2018-08-29 11:14:22.143850 [INFO] [188.39.70.44:50493:HTTP2-109] File not found [/home/expertdebthelpco/public_html/403.shtml]
Kind regards.
Lee
August 29, 2018 at 9:27 am #663490Tom
Lead DeveloperLead DeveloperHi there,
Your server is likely stopping the plugin from saving a
<script>
element to your database. This is a security measure that some hosts implement to prevent bad stuff from being inserted into your database without your knowledge.You should be able to get your host to allow the plugin to do it if you report it to them.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 30, 2018 at 6:35 am #664253Lee
Hi Tom.
Thanks for coming back to me – you were spot on. I have spoken to our hosting company and they have sorted it.
Thanks for the awesome support!
Lee
August 30, 2018 at 8:53 am #664491Tom
Lead DeveloperLead DeveloperNo problem. Glad you got this sorted out! 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.