Site logo

Archived topic

Issue with GP Hooks

7 replies · Started by Lee on August 23, 2018

Viewing posts 1–8 of 8

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

Hi 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.

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

Ok, 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.

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

Hi 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.

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

No problem. Glad you got this sorted out! :)

This archived topic is closed to new replies.