Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

js API trackGoal() does not seem to work #1892

Closed
anonymous-matomo-user opened this issue Dec 14, 2010 · 2 comments
Closed

js API trackGoal() does not seem to work #1892

anonymous-matomo-user opened this issue Dec 14, 2010 · 2 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@anonymous-matomo-user
Copy link

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
Copy link
Contributor

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

@robocoder
Copy link
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.) Goal Tracking plugin list of feature requests #1434

Please use the forum for further assistance.

@anonymous-matomo-user anonymous-matomo-user added this to the Piwik 1.1 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants