jamper
jamper

Reputation: 277

google analytics track multiple downloads

Trying to add Google analytics tracking to three files within WordPress. My code is placed in the header and it's the following:
_gaq.push(['_trackEvent', 'File Downloads' ,'download', 'click', 'SITE URL HERE/wp-content/uploads/2014/09/Application-form-v1-2014.doc', 1);

Had the code up for about a week and no results in the events section of the analytics panel - I've clicked them individually to test.

Any help would be great.

Thanks

Upvotes: 0

Views: 109

Answers (1)

dm-guy
dm-guy

Reputation: 566

It seems that you send 5 values, while you can send max 4.

The pattern is _trackEvent(category, action, opt_label, opt_value, opt_noninteraction)

when opt_value can be only an integer, and opt_nointeraction a boolean. In your case you can remove the 'click', and it should work. The 'SITE URL...' will take the space of the label, and "1" of the value.

Upvotes: 1

Related Questions