Open dhowe opened 4 years ago
Two open source alternatives that can be installed locally. openwebanalytics: http://www.openwebanalytics.com/ countly: https://github.com/Countly/countly-server
Countly installation script assumes it is running on a fresh, decent Ubuntu/CentOS/RHEL Linux without any services listening on port 80 or 443 (which should also be open to incoming traffic), and takes care of every library and software required to be installed for Countly to run.
[ON HOLD - BLOCKED BY #140 ]
Add this code to the relevant pages on the site (ignore Wordpress for now):
To track page views using Javascript, cut and paste this tracking tag into the HTML of your web pages. Learn more about how to use OWA's Javascript tracking API to track your web site and pages.
<!-- Start Open Web Analytics Tracker -->
<script type="text/javascript">
//<![CDATA[
var owa_baseUrl = 'https://rednoise.org/owa/';
var owa_cmds = owa_cmds || [];
owa_cmds.push(['setSiteId', '4b0abd7f174679a5dc058eb6ebdd336d']);
owa_cmds.push(['trackPageView']);
owa_cmds.push(['trackClicks']);
(function() {
var _owa = document.createElement('script'); _owa.type = 'text/javascript'; _owa.async = true;
owa_baseUrl = ('https:' == document.location.protocol ? window.owa_baseSecUrl || owa_baseUrl.replace(/http:/, 'https:') : owa_baseUrl );
_owa.src = owa_baseUrl + 'modules/base/js/owa.tracker-combined-min.js';
var _owa_s = document.getElementsByTagName('script')[0]; _owa_s.parentNode.insertBefore(_owa, _owa_s);
}());
//]]>
</script>
Can we verify that there is tracking code on all the pages, including the new detail pages and the events ?
Yes, I can verify the tracking code on the new detail pages for the published site. By events do you mean the wordpress site?
Yes. I'm not sure if we can use the same OWA instance for the wordpress
Just added it to the wordpress home page, can you check whether it works for OWA at all? Potentially it can also be added to all wordpress pages if needed.
I don't see it, after also visiting it myself. I think something more may be required to get it working with wordpress. Did you read this?
Also, we need to figure out how to set the 'page-type' for each of the pages -- it is currently 'unset' everywhere.
Ping me when working again and I can give you access to owa
owa_cmds.push(['setPageType', 'Home']);
doesn't seem to work as expected, related issues: https://github.com/Open-Web-Analytics/Open-Web-Analytics/issues/366
perhaps it is bc our owa is not updated (see the messages on lower right in the admin ui) if you feel comfortable, try the updates...
did you try: window.OWATracker.setPageType('your-page-type') ?
wpr works fine now, get stucked on setPageType. I have created a ticket for this in their github repo, will see if anyone answers there.
I think this is what we need for setPageType to work:
Go into the DB and alter it manually in the owa_document table. I think if you've visited the site before you added the owa command it won't update the site info and remain (not set) or whatever it is.
are there decent analytics we can use other than google?