-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathreadme.txt
More file actions
104 lines (66 loc) · 4.18 KB
/
readme.txt
File metadata and controls
104 lines (66 loc) · 4.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
------------------------------------------------------
InaneCoding Piwik OpenCart Ecommerce VQmod
------------------------------------------------------
Author: Kevin Bibby / InaneCoding.co.uk
Version: 0.3
Release Date: 2013-05-16
License: GNU General Public License (GPL) version 3
------------------------------------------------------
DESCRIPTION
-----------
Implements Piwik Ecommerce tracking for Opencart;
> Tracks regular page views
> Tracks Ecommerce product views (category views not yet implemented)
> Tracks Ecommerce cart add/update/delete
> Tracks Ecommerce orders
FILES
-----
piwik.php - Upload to your /catalog/model/tool/ directory.
piwik.xml - Upload to your /vqmod/xml/ directory.
Fully VQmod'ed up! Mod does NOT change any core files.
READ everything below to finish the setup (more steps required).
IMPORTANT
---------
1. Requires VQmod installed.
2. Requires Piwik installed.
2. You must have the piwiktracker.php file in your Piwik directory
Go to http://piwik.org/docs/tracking-api/ and look for the 'Click here to download the file PiwikTracker.php' link.
3. Only tested on OpenCart 1.5.3.1 & 1.5.4.1, VQmod 2.1.6 & 2.1.7 , and Piwik 1.84 & 1.91
(may well work on others - please tell me what you find out!)
LIMITATIONS
-----------
This is an early pre-release and is not finished. It is functional at a basic level.
1. There is no admin back-end. You MUST open the piwik.php file and customise your settings at the top of the file.
a) Replace "https://yoursite.com/piwik/" and the "http://yoursite.com/piwik/" with your Piwik URL - be sure to leave the 's' in https on the first line and don't forget the trailing '/'. (without the ' in both cases)
b) Replace the site ID with the Piwik ID for your website. To find this, login to your Piwik admin, go to 'Settings' and then click in the 'Websites' tab. Your site id is listed in the first column.
c). Replace the ??.. with your Piwik auth code. To find this in your Piwik admin, go to 'API' and copy the series of characters in the blue box after &token_auth=. Do not include &token_auth in the auth code line.
d). Replace the /home/~user/public_html/piwik/PiwikTracker.php with the location of your PiwikTracker.php file (you did remember to download it from Piwiks site, didn't you?). In most cases this just requires replacing '~user' with your hosting username. You can often work out this location by looking at the directory structure when logged in via FTP, or if using CPanel, by looking at the directory path in the file manager.
2. There is no functionality (yet) to report/track the category during page views / cart updates / orders. This will be added in a later version.
VERSION HISTORY
---------------
v0.3 - 2013/05/16
First release of admin backend feature
Arranged source files in an opencart folder structure for easy uploading
v0.2 - 2012/11/04
Fixed a bug where the ecommerce action would sometimes not get attributed to the correct visitorID.
Improved Installation Instructions
v0.1 - 2012/10/20
First pre-release version.
Basic Ecommerce functionality.
No category reporting.
No admin back-end
KNOWN BUGS
----------
There is a bug with PiwikTracker.php and OpenCart due to 'HTTP_REFERRER' being used without checking if it is defined or not. This code has an '@' symbol to suppress the error but for some reason this doesn't always work.
The symptom is text at the top of your site which is similar to "Notice: Undefined index: HTTP_REFERER in ????/PiwikTracker.php on line 84".
To turn off the display of the error on your site, go to your opencart admin. Go to System > Settings , click 'edit' by your site, then click the 'Server' tab. At the bottom change "Display Errors:" from 'yes' to 'no'. That will stop it displaying.
SUPPORT
-------
I'm happy to help if you have any problems (though can't promise large amounts of time).
I'm also keen to get your feedback (dont be afraid to be critical if I've done something wrong!).
It would be great to hear of your experiences and what could be improved.
- kevin@inanecoding.co.uk
If you find the mod helpful donations are of course appreciated! Paypal to st@icpla.net :)
WITH THANKS TO
--------------
Gordon Downie - for his brilliant code contribution to add an opencart admin backend.