简体   繁体   English

Google Analytics(分析)转换会将交易连结至客户编号theiconic / php-ga-measurement-protocol

[英]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. 我经营会员企业,并从webgains / awin api获取所有交易。 I have the GA client id which looks like this for example: 1735654072.1483261999 . 我有如下所示的GA client id1735654072.1483261999 Now I want to link this transaction to Google Analytics to see where my users/transactions are coming from. 现在,我想将此交易链接到Google Analytics(分析),以查看我的用户/交易来自何处。 I'm using the following package for this 我正在使用以下软件包

https://github.com/theiconic/php-ga-measurement-protocol#order-tracking-with-simple-e-commerce 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? client id是否是链接事务和用户的正确方法?

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而不是clientIdclientId用于唯一的用户跟踪,而不用于跨浏览器和设备跟踪。 UserId is the one you are looking for. UserId是您要查找的用户。

Why not to use clientId for transaction? 为什么不使用clientId进行交易? 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. clientId基于cookie,如果用户删除了cookie,则Google Analytics(分析)会为该用户分配一个新cookie,将其连接到事务会导致基于用户的跟踪结果不准确。

You can go through the official implementation guide for userId to know more about it . 您可以阅读userId官方实施指南以了解更多信息 Note of caution - You will have to send userId to userId enabled view 注意事项-您必须将userId发送到已启用userId的视图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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