0

I'm using a language that doesn't have a GA library to use (Brightsign). I'm constructing my own calls to GA and am having difficulty with the event logging. My page views come through just fine. Here's an example. Can anyone see what the issue might be? I've un-escaped it for readability here:

URL - http://www.google-analytics.com/__utm.gif?utmwv=1&utmn=1417288960&utmsr=720p HDTV&utmsc=24-bit&utmul=en-us&utmje=0&utmfl=-&utmdt=Roku App&utmhn=MySite&utmr=-&utmp=/main&utmac=UA-mycode-1&utmcc=__utma=1101868416.1987833600.1455862135.1455862135.1455862135.2;+__utmb=1101834416;+__utmc=1101868416;+__utmz=1101868416.1455862135.2.2.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none);+__utmv=1101868416.13A186137954;&utme=5(Initialize*Init Main*Device Type)(HDTV)&utmt=event

Then url encoded request looks like:

http://www.google-analytics.com/__utm.gif?utmwv=1&utmn=1417288960&utmsr=720p%20HDTV&utmsc=24-bit&utmul=en-us&utmje=0&utmfl=-&utmdt=Roku%20App&utmhn=MySite&utmr=-&utmp=%2Fmain&utmac=UA-mycode-1&utmcc=__utma%3D1101868416.1987833600.1455862135.1455862135.1455862135.2%3B%2B__utmb%3D1101868416%3B%2B__utmc%3D1101868416%3B%2B__utmz%3D1101868416.1455862135.2.2.utmccn%3D(direct)%7Cutmcsr%3D(direct)%7Cutmcmd%3D(none)%3B%2B__utmv%3D1101834416.13A186137954%3B&utme=5(Initialize*Init%20Main*Device%20Type)(HDTV)&utmt=event

============= EDIT =================

I've implemented GA Measurement Protocol and I still get nothing... Here's my request now:

POST to: 
http://www.google-analytics.com/collect
(and even http://www.google-analytics.com/debug/collect)

Post data (unescaped)
v=1
&an=MyChannel
&cid=1115131264
&tid=UA-XXXXXXXX-Y
&t=event
&ec=My App
&ea=Initialize
&el=Device Type
&ev=HDTV
&z=1299802880

I'm not seeing ANYTHING on my GA account, I'm getting a GIF89? response; and I'm not getting any response from the /debug/collect. I set up an echo server and can see the post data, plus:

POST /
user-agent: Roku/DVP-7.0 (027.00E09044A)
host: 10.0.0.145:8124
accept: */*
content-type: application/x-www-form-urlencoded

Any help would be greatly appreciated.

++++++++++++++ UPDATE +++++++++++++++

I wasn't ever able to get POST to work with my particular platform (Roku), but GET with a bunch of variables worked in the end. Turns out that the &ev=HDTV was incorrect, as ev must be a number... Hope this helps someone

panzhuli
  • 2,890
  • 6
  • 33
  • 46
  • 3
    if you are trying to construct your own calls why aren't you using the measurement protocol? https://developers.google.com/analytics/devguides/collection/protocol/v1/?hl=en – Linda Lawton - DaImTo Feb 19 '16 at 07:21
  • Ya. Maybe I have to rewrite the package. I was trying to use the legacy code I inherited... – panzhuli Feb 19 '16 at 21:43
  • Question has been updated – panzhuli Mar 01 '16 at 06:40
  • try building it as a HTTP get and dumping it in a web browser with debug see what you get. How ever for starters ev is an int sending HDTV isn't going to work. Make sure you check the oducmentation. https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#ev – Linda Lawton - DaImTo Mar 01 '16 at 08:36
  • updated with what worked, in case anyone else needs help – panzhuli Mar 01 '16 at 21:17

0 Answers0