WebFaction
Community site: login faq

I think I've solved this, but I wanted to post it anyways just to make sure I understand what the problem is (and others may benefit from it too).

I was adding the google analytics snippet to my django-site; on google's website it says you can both add it before the < /head > element, or before the < /body > one. I chose the first option, but I started having "502 Bad Gateway ngix" errors..

I removed the analytics snippet from the head element, and put it at the end of the page, and now things seem to work.

I then found out here that that error is typical of an app sending too large headers - suppose that's what was going on right?

Thanks..

asked 06 Dec '10, 06:55

mike
737
accept rate: 0%

bad news: still getting the 502 Bad Gateway error!!!

(06 Dec '10, 06:57) mike

UPDATE: the issue wasn't related to the GA snippet I added, but another problem in the application!! sorry!

(06 Dec '10, 07:27) mike

It shouldn't matter where you put the code, as long as it is in one of the two places Google says to place it. Adding it right before </head> does not add it to the HTTP headers, so it will not cause the error caused by having too large of headers.

permanent link

answered 06 Dec '10, 08:46

aaronh ♦♦
1.3k3
accept rate: 34%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×186
×2
×1

question asked: 06 Dec '10, 06:55

question was seen: 7,521 times

last updated: 06 Dec '10, 08:46

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM