Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
5.2k views
in Q2A Core by
I have  posted a question like this before but I couldnt get any answers.

When I try to copy Google Analytics code, error 403 pops up. <script> code brings about the error, actually. Whenever I delete that part, its ok, yet when I add <script> 403 occurs.

I dont know what to do.
by
can you disable below three plugins, add analytics code and check again.

Akismet Spam Filter
AntiBot Captcha
On-Site-Notifications
by
It wont work :(

In addition to this error, Users cannot ask a new question whose title begins with CC due to the same error. However, if they write CC at the end of the title no error pops up.
by
Exactly WHAT are you pasting and exactly WHERE are you pasting it?
by
http://www.simdunyasi.com/wp-content/uploads/52525.png

the section is called Custom HTML at bottom of every page in English. When I try to save this the error pops up. If I delete the <script> parts, no error show up. However, the code won't work that way.

2 Answers

+1 vote
by
selected by
 
Best answer

Q2A has nothing to do with this issue and based only in the information you've shared, you don't seem to be doing anything wrong. I'd rather ask for help to your hosing provider.

You also haven't explained much about the issue. For example, when do you get the 403 error? Immediately after you save the settings? What does the web browser's console log and network tab display?

Anyway, if you get a 403 error you are not being able to access the URL you're POSTing to when saving, which happens to be the same URL you were accessing with a GET.

So you have seriously messed with your web server configuration (or your hosting company has) or maybe there is some kind of ridiculous security setting that won't allow you to POST JavaScript code.

BTW, I don't think GoogleAnalytics has anything to do with this and I'm pretty sure this code would also fail:

<script>alert('Hello');</script>

If it works then you should ask your hosting provider why they don't allow your pages to contain a link to GoogleAnalytics, which is obviously ridiculous.

by
I get the error as soon as I save settings. It says ''403 Forbidden - Access to this resource on the server is denied!''

I don't think I have done anything that might have broken the codes. I used to get this error two years ago, as well. Then, I set up a new Q2A, yet it's still the same. Apparently, it is all about the hosting provider.

As you suggested, that code didn't work, as well.

Thanks for all your helping.
by
Best answer has already been selected so please follow the instructions. (Ask your hosting provider)
0 votes
by

i check in other hosting provider and i found the problem is the hosting iam sure 100%

...