GoalTracking (JS)


(stefan) #1

Hello,

since yesterday I try to integrate GoalTracking into my Webshop…
There is something i´m doing wrong, but i can´t find my failure…
can somebody help me please?

my Code:


<script type="text/javascript"> 
try { 
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1); 
piwikTracker.trackPageView(); 
piwikTracker.enableLinkTracking(); 
piwikTracker.trackGoal(3, '8.32'); 
} 
catch( err ) {} 
</script>

Code for the Goal in my DB:
idsite: 1
idgoal: 3
name: JSTracker
match_attribute:url
pattern: Domain.de - Seite nicht gefunden
pattern-type: contains
case sensitive: 0
revenue: 99
deleted:0

Thanks in advance!!!


(Matthieu Aubry) #2

do you mean that no goal are showing in your reports for idsite=1 for this goal, for today?


(stefan) #3

yes there were no goals displayed for today…


(stefan) #4

Does somebody know which settings I need for tracking a goal with JS?

idsite: 1
idgoal: 3
name: JSTracker
match_attribute:url
pattern: Domain.de - Seite nicht gefunden
pattern-type: contains
case sensitive: 0
revenue: 0
deleted:0

Do I have To change match_attribute / pattern / pattern-type

Or is my JS code wrong?

THANKS


(Matthieu Aubry) #5

It looks good to me. Maybe try to delete piwik/tmp/cache/* and try again?


(stefan) #6

ok, now it tracks this goal, but the counter and the values are totaly wrong…
is there a possibility to see all single tracked events in Database or so?
I think it counts some events more than 2-3 times… but to search the error i need a detailview or so…

Thanks in advance!


(Matthieu Aubry) #7

Only the live! widget can give you goal conversions by visitor (there is a flag icon for converted visits).
Otherwise you can look in the DB: piwik_log_visit.visit_goal_converted field, and in the piwik_log_conversion table for the detail. Each goal can be triggered only once per visit.