Ilya Suzdalnitski
Ilya Suzdalnitski

Reputation: 53560

Google Analytics won't track events

I'm using the Measurement Protocol for event tracking.

It correctly displays pageview hits, however fails to detect event hits.

Pageview that succeeds:

http://www.google-analytics.com/collect?
                               v=1
                               &tid=UA-XXXXXXXX-1
                               &cid=555
                               &uip=10.10.10.10
                               &t=pageview
                               &dl=mysite.com

Event that fails:

http://www.google-analytics.com/collect?
                               v=1
                               &tid=UA-XXXXXXXX-1
                               &cid=555
                               &uip=10.10.10.10
                               &t=event
                               &ec=category
                               &ea=view

All of the required parameters are included - v, tid, cid, t, ec, ea. How can I make the event work?

Looks like I'm missing something obvious. Thanks!

Upvotes: 1

Views: 828

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 117321

I think you are missing EL

  • ec – Event Category
  • ea – Event Action
  • el – Event Label
  • ev – Event Value

&t=event&ec=list&ea=accounts&el=userclicked&ev=10

When it works it should show up in the Real-time makes testing easer :)

Update:

I just tested with the following and it works:

http://www.google-analytics.com/collect?v=1&tid=UA-XXXXX-1&cid=555&uip=10.10.10.10&t=event&t=event&ec=list&ea=accounts&el=userclicked&ev=10

Note: Remember it takes between 24 - 72 hours for a new Google Analytics account to log data I don't think this is the issue since you said that pageviews are working. It also takes 24 hours for data to show up in the standard reports so you will have to check the real-time reports to see that its working.

Upvotes: 1

Related Questions