Set IP and Cookie to Google Analytics.
original:Analytics IP
Original is great but it does not support cross-domain.
If the index of IP Address is 6
ga('set', 'dimension6', setAnalytics.getIP());
→ex. XXX.XXX.XXX.XXX
→MD5 hash
→ex. 2014/05/28 12:04:42
Secure
<script type="text/javascript" src="./analytics.php?s=X"></script>
- setIP
- setCookie
- setAccessTime
- setAnalytics_event
analytics.min.php and analytics.tag.min.php support is more than PHP5.4
If an error message displays.
date(): It is not safe to rely on the system's timezone settings.
php.ini add
date.timezone = Asia/Tokyo
- analytics_cookie.js
- analytics_cookie.min.js
- analytics_cookie.tag.js
- analytics_cookie.tag.min.js
setIP() and secure don't support.
July 22,2014 Change expire settings.
December 5,2014 Typo modified.