1

I am trying to send multiple hits in a single request to Google Analytics ! Sometimes it sends one or two hits, sometimes it doesn't send at all !

enter image description here

I have tried to do the same thing, placing \n after each hit in my request https://www.google-analytics.com/batch?v=1&t=event&tid=UA-XXXXX-1&cid=555&ec=video&ea=play&el=holiday&ev=300\nv=1&t=event&tid=UA-XXXXXX-1&cid=555&ec=test&ea=test&el=test&ev=test

But still, sometimes it sends one or two hits, sometimes it doesn't send anything ! Please, help me to deal with this issue !

Fuzayl
  • 43
  • 6
  • What do you meant by send one or two hits? You checking this in network or in GA – raja pateriya Jul 17 '20 at 14:37
  • @rajapateriya, I mean when I send multiple events to google analytics using measurement protocol (/batch), in google analytics real time, I sometimes see no event, sometimes one or two of the events – Fuzayl Jul 18 '20 at 05:25
  • "I sometimes see no event, sometimes one or two of the events" where are you seeing these events, in Google Analytics portal? If yes then in real time reports or in historical reports? – raja pateriya Jul 19 '20 at 04:30
  • @rajapateriya, I see them in real time reports ! – Fuzayl Jul 19 '20 at 07:24

2 Answers2

1

It looks like you are using wrong ev values, event value cannot be string it can only be integers. And you are passing ev = test for 2 entries. Check This

For more details on the GA parameters and its value check this

raja pateriya
  • 332
  • 2
  • 15
0

Try to send with a little delay between the individual hits or add more parameters like location and screen resolution.

Michele Pisani
  • 13,567
  • 3
  • 25
  • 42