Track loading of a piece of content - manual trigger

Hello Piwikers,

Can somebody help me understand where I’m going wrong as I’m not great with JS.

Currently piwik tracking is working and already in place on every page.

I’ve use manual tracking for onclick events, however I’m looking to track the loading of a piece of content.

So in that content block I’ve got the followin (see below), which loads only when a particular event is triggered. However this is not producing any data / goal triggers so I’m wondering what I’m doing wrong.

Thanks,

Nic

Ah OK, just realised that the trackGoal will fire before the footer script.

I added this to the section of content that loads on completion of the goal when the page is reloaded, however no goal is registered

What am I doing wrong ?

I’ve checked the goal ID is correct “1” and that the goal is set to manually trigger using the JavaScript API trackGoal().

I’ve checked that the script loads only when that piece of content loads onto the page when page is reloaded)

I’m triggering the even from an IP that is not filtered from the results.

Its tracking visits (script is also loading into page footer for this), however no goal conversions using manual trigger.

Any ideas ?

OK, I found the problem. The piwik tracker is being run inside a tabbed region which is also running a script and causes a script error