Goal Tracking Issues


#1

New to the Piwik platform, started off great. I am trying to record goal conversions. It was originally working great in the development environment, however since going live it does not work.
The scenario:
User purchases item, javascript is “_paq.push([‘trackGoal’, 1, num]);” where num = item value. Then the user is redirected via javascript. I thought maybe they are being redirected too fast, so put a 5 second timeout before redirecting, but still no luck.
I have also tried using the image tracking to no avail.

The piwik system is hosted on a different server, though I doubt this has any effect as page views are still being tracked.

Any help or if anyone could point me in the direction to look. That would be great.

Thanks.


(Matthieu Aubry) #2

The best way would be to “debug” the piwik tracking requests by looking at the HTTP requests in your browser, see some pointers in Tracking HTTP API: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3


#3

Thanks for your response Matt.

With debugging enabled, I receive the following:

DEBUG Piwik\Common[2014-05-28 09:25:31] [d83e4] Debug enabled - Input parameters:

DEBUG Piwik\Common[2014-05-28 09:25:31] [d83e4] array (

DEBUG Piwik\Common[2014-05-28 09:25:31] [d83e4] ‘idSite’ => ‘1’,

DEBUG Piwik\Common[2014-05-28 09:25:31] [d83e4] ‘rec’ => ‘1’,

DEBUG Piwik\Common[2014-05-28 09:25:31] [d83e4] ‘idGoal’ => ‘1’,

DEBUG Piwik\Common[2014-05-28 09:25:31] [d83e4] ‘revenue’ => ‘22’,

DEBUG Piwik\Common[2014-05-28 09:25:31] [d83e4] )

DEBUG Piwik\Common[2014-05-28 09:25:31] [d83e4] Loading plugins: { Provider,Goals,PrivacyManager,UserCountry,Login,UsersManager,SitesManager }

DEBUG Piwik\Common[2014-05-28 09:25:31] [d83e4] Current datetime: 2014-05-28 09:25:31

and a white box with:

Invalid idSite: ‘0’

Backtrace:

#0 /public_html/analytics/core/Tracker/VisitExcluded.php(37): Piwik\Tracker\Request->getIdSite()
#1 /public_html/analytics/core/Tracker/Visit.php(85): Piwik\Tracker\VisitExcluded->__construct(Object(Piwik\Tracker\Request), ‘Q\x95,&’)
#2 /public_html/analytics/core/Tracker.php(827): Piwik\Tracker\Visit->handle()
#3 /public_html/analytics/core/Tracker.php(242): Piwik\Tracker->trackRequest(Array, NULL)
#4 /public_html/analytics/piwik.php(126): Piwik\Tracker->main()
#5 {main}

I don’t understand how it says invalid idSite:0 when it has got it in the debug array.


(Matthieu Aubry) #4

Please use “idsite” instead of “idSite” for Tracking API requests. This bug was fixed in Image tracker displays wrong code: idSite= but idsite= should be used instead · Issue #5131 · matomo-org/matomo · GitHub