- This topic has 7 replies, 3 voices, and was last updated 3 years, 8 months ago by Tom.
August 23, 2018 at 4:20 am #657667Lee
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:
Access to this resource on the server is denied!
Any ideas to what is going wrong?
LeeGeneratePress 2.1.4GP Premium 1.7.2August 23, 2018 at 8:09 am #657963DavidStaffCustomer Support
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:
3. Check with your host to make sure the htaccess (if used) is not corrupt) and that the File Permissions are correctly set.August 24, 2018 at 2:42 am #658655Lee
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.
LeeAugust 24, 2018 at 6:55 am #658831DavidStaffCustomer SupportAugust 29, 2018 at 3:16 am #663098Lee
There’s one error in the error log on the server:
2018-08-29 11:14:22.143850 [INFO] [220.127.116.11:50493:HTTP2-109] File not found [/home/expertdebthelpco/public_html/403.shtml]
LeeAugust 29, 2018 at 9:27 am #663490TomLead DeveloperLead Developer
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.August 30, 2018 at 6:35 am #664253Lee
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!
LeeAugust 30, 2018 at 8:53 am #664491
- You must be logged in to reply to this topic.