Track 404 page in piwik 2.1.0


hi, i can see in my piwik dashbord by visitors in realtime a visitor how become a 404 page
i can not see this page in my page view.

i have search by google for tracking 404 page and find some sollutions but the write about a piece of code i should insert in my piwik tracking code (footer from WP Theme)

the code they have written should be

if ( Not Found/i) !== -1) {
piwikTracker.setDocumentTitle('404/URL = '+String(,"%2f") + '/From = ’ + String(document.referrer).replace(///g,"%2f"));};

this code i supose to place before


but the last code ( piwikTracker.trackPageView(); ) i do not find it in my piwik tracking code can somebode help me out here?