简体   繁体   中英

GA Conversions link transaction to client id theiconic/php-ga-measurement-protocol

I run an affiliate business and I obtain all my transactions from webgains/awin api. I have the GA client id which looks like this for example: 1735654072.1483261999 . Now I want to link this transaction to Google Analytics to see where my users/transactions are coming from. I'm using the following package for this

https://github.com/theiconic/php-ga-measurement-protocol#order-tracking-with-simple-e-commerce

The problem is that the transactions are not linked to the users. What am I doing wrong? Is the client id the correct way to link a transaction and a user?

I would recommend setting up userId instead of clientId , clientId is meant for unique user tracking and not for cross browser and device tracking. UserId is the one you are looking for.

Why not to use clientId for transaction? clientId is based on cookies, if user deletes the cookies, Google Analytics assigns the user a new one, connecting this to transaction will lead you to inaccurate results in user-based tracking.

You can go through the official implementation guide for userId to know more about it . Note of caution - You will have to send userId to userId enabled view

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM