Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| //Parse the GA Cookie | |
| function gaParseCookie() { | |
| if (isset($_COOKIE['_ga'])) { | |
| list($version, $domainDepth, $cid1, $cid2) = explode('.', $_COOKIE["_ga"], 4); | |
| $contents = array('version' => $version, 'domainDepth' => $domainDepth, 'cid' => $cid1 . '.' . $cid2); | |
| $cid = $contents['cid']; | |
| } else { | |
| $cid = gaGenerateUUID(); | |
| } | |
| return $cid; |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/