$cid1 and $cid2 are not set anywhere. Let's clean up measurement_protocol_get_cookie(). What is really needed is a cid, so let's rename it to measurement_protocol_get_cid(). If a _ga cookie is found then use the relevant portions of it. If not, generate a UUID.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | interdiff-2915927-6-7.txt | 632 bytes | jacob.embree |
| #7 | measurement_protocol-get-cid-2915927-7.patch | 1.91 KB | jacob.embree |
| #6 | measurement_protocol-get-cid-2915927-6.patch | 1.96 KB | jacob.embree |
Comments
Comment #2
jacob.embree commentedPerhaps this is a bit hasty, but here's a patch to implement the suggestion in the original post.
Comment #3
jacob.embree commentedUpdating the issue summary.
The patch in #2 is misguided.
Comment #4
jacob.embree commentedComment #5
jacob.embree commentedComment #6
jacob.embree commentedTo use the uid parameter it's necessary to set up User ID tracking at Admin->Property->Tracking Info->User-ID.
This patch uses uid first, and cid for anonymous users.
Somebody, please, jump in with suggestions or explanations of why the current code shouldn't change.
Comment #7
jacob.embree commentedWith "session unification" it's no problem to have both uid and cid set. This patch sets cid no matter what and uid if the user is authenticated.
Comment #8
jacob.embree commentedUpdating issue summary.
Comment #9
vladsavitsky commentedPatch fixes described issue and works fine.
Comment #10
nvahalik commentedSorry it took so long—I never saw notifications about these. Committed!
Comment #11
nvahalik commentedComment #12
jacob.embree commented@nvahalik, thanks! It looks like you committed to the master branch instead of 7.x-1.x. After you commit to 7.x-1.x you should probably remove the master branch to avoid confusion. See https://www.drupal.org/empty-git-master for details.