We are implementing Omniture data insertion for a catalog web service. We have tried both HTTP POST and HTTP GET. POST seems to work as documented, but GET does not:
1. The document site says that both GET and POST responses have a status message. But we always got an empty response from GET, even the data were successfully inserted.
2. When sending a GET request without cookie, we got a redirect with some new cookie, even if "visitorID" was set in the request. Why is that? And how to avoid redirect and cookie?
For example:
original request: http://xxx.autozone.com/b/ss/report-suite-id/0?pageName=http-get&visitor...
redirect: http://xxx.yyy.zzz/b/ss/report-suite-id/0?AQB=1&pccr=true&vidn=253859BC0...
cookie: s_vi=[CS]v1|253859BC051D3781-4000012B00003779[CE]; Expires=Mon, 28 Jul 2014 20:39:20 GMT; Domain=.autozone.com; Path=/
Please advise. Thanks.
Feng
Sorry this post is so late but thought it should be noted.
First, GET does not send a response, only POST with XML. If you don't care if you get a response, then you can send via GET to save a little bandwidth. Otherwise use post to verify your submissions.
On that note, it should be noted that the only reason you would get a failure is of the following reasons, which is only available via POST:
1) No page name or page url supplied
2) No IP address or visitor ID supplied
3) No reportSuiteID defined
Outside of that, there are no other errors to expect.
To answer how to overcome the server redirect by our collection servers, you need to set a new header, X-Forwarded-For:, along with the ip address of the client. This tells the collection server to forgo the cookie handshake process and just take the data using the supplied visitor id as the unique identifier.
Again, sorry this is late but hopefully someone will find it useful.
Nick