@anonymous-matomo-user opened this Issue on December 14th 2010

Repro

Install Piwik instance.
Create a single Goal, manually activated.
Point browser to a page ('test.html') that has the following code

   piwikTracker.trackPageView();
   piwikTracker.enableLinkTracking();
   piwikTracker.trackLink("http://example.com/2", "link");
   piwikTracker.trackGoal(1);

(note: tried this with IE8 and FF3.6.x, cookies enabled; with a cleaned cache and without.)

Expected To See

Table piwik_log_link_visit_action has entries for test.html and for manually tracked example.com/2 links.

Table piwik_log_conversion has entry for goal 1.

Actually Saw

Only the entries in the piwik_log_link_visit_action table. Goal was not tracked.

Further Notes

Cannot find anything in docs why Piwik would choose to ignore an API command.

@robocoder commented on December 15th 2010 Contributor

This should work. Do your web server logs show the trackGoal request hitting the server?

@robocoder commented on December 15th 2010 Contributor

Your example is similar to my typical test script. However, I'm currently unable to reproduce this in trunk. I get the expected page view, outlink, and conversion recorded. (And just for kicks, I repeated this and tested the async API. Same results.)

These are some implementation limitations to be aware of:

  • goals are associated with a specific site; that is, if goal 1 is associated with site 1, you can't record goal 1 with site 2 (i.e., goals aren't globally defined across all sites)
  • only one goal can be recorded per visit. (In the context of your example, if you have other goals defined to trigger on the pageview or outlink, then the manual one won't be recorded.) #1434

Please use the forum for further assistance.

This Issue was closed on December 15th 2010
Powered by GitHub Issue Mirror