How to connect Google Analytics Measurement Protoc

2019-04-14 11:06发布

问题:

I have a website with Google Analytics tracking on and I have a goal that listens to the event EVENT1.

If I open a private tab and go to page P1, I can see it being registered as a landing page. All good.

And I visit a second page, P2, and then send the event EVENT1 (which is connected to a goal) I will see that the landing page now gets a goal conversion. All good.

This is the view I am talking about (please note that the data in the image does match my example!):

However, if I create a new GA session, and thereby get a new client ID (let's say the ID is CID123), visit page P1 then P2, but my backend sends the event instead over the Measurement Protocol to Google Analytics, where I specify cid=CID123, then the landing page conversion does not work.

I can see the event coming into Google Analytics, and I can see the goal is increased, but for some reason, the landing page conversion status does not work.

So my question is..

.. how do I connect a front end GA session with anything I send over the Measurement Protocol?

Since the landing page conversion does not get updated, it seems like I am missing information in my backend hits to allow Google Analytics understand its the same session.

Is specifying the client ID cid= the only thing required? Or are there any other fields/properties/data that I need to attach to connect them two?