2.1K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

Event Tracking Code

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I've been attempting to add Event Tracking codes to my web pages, but have been unsuccessful. The source coding on the back-end of my site is very simple compared to HTML coding (i'm no expert at coding). The URL to the page is https://www.u1cu.org/direct_deposit

Below is an example of what I see and where I have placed my tracking code:

 

<h1><span style="font-size: 24px"><span style="font-family: Arial">One less thing to worry about. </span></span></h1>

<p><span style="font-size: 14px"><span style="font-family: Arial">Direct Deposit offers&nbsp;peace of mind for an easy transfer of payroll&nbsp;funds directly to your U1 account(s).</span></span></p>

<p><span style="font-size: 14px"><span style="font-family: Arial">Simply apply by filling out the form below.</span></span></p>

<p><a href="/files/u1cu15/1/file/Applications/payrolldeductionapp.pdf" onclick="_gaq.push(['_trackEvent', 'Button', 'Click', '/direct_deposit']);"><img alt="Universal one direct deposit application" height="29" src="/files/u1cu15/1/image/ApplyButtonFINAL.gif" width="90" /></a></p>

 

However, when I set up my goal in Analytics, the event never shows in real-time. I've speculated that this is a coding issue, but the developers of my website are managed by a third party. This would result in a cost to me if I wish to reach out to them for placing the code, which I wish to avoid if possible. PLEASE HELP! Thank you

 

1 Expert replyverified_user

Re: Event Tracking Code

Top Contributor
# 2
Top Contributor

Hi Sam :-)
The page is using Universal analytics.js however the event tracking code is for the previous version of the tracking code so wont fire/track.

 

Are you wanting to track it as an event or do you need to be able to use it as a step in creating Goal Funnels?

 

If you want to track it as an event:
<p><a href="/files/u1cu15/1/file/Applications/payrolldeductionapp.pdf" onclick="ga('send', 'event', 'Button', 'Click', 'Direct Deposit');"><img alt="Universal one direct deposit application" height="29" src="/files/u1cu15/1/image/ApplyButtonFINAL.gif" width="90" /></a></p>

 

If you want to track it as a virtual pageview:
<p><a href="/files/u1cu15/1/file/Applications/payrolldeductionapp.pdf" onclick="ga('send', 'pageview', '/direct_deposit');"><img alt="Universal one direct deposit application" height="29" src="/files/u1cu15/1/image/ApplyButtonFINAL.gif" width="90" /></a></p>

 

Pls post back if you have further questions


Thanks
Bronwyn :-)

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Re: Event Tracking Code

Follower ✭ ✭ ✭
# 3
Follower ✭ ✭ ✭

@Sam M

 

Hi,

 

You use Universal Analytics on your website, and you add event in classical GA.

You have to correct your _gaq.push to qa

Check this

https://developers.google.com/analytics/devguides/collection/analyticsjs/events 

 

SH

Re: Event Tracking Code

[ Edited ]
Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

Thank you very much! This seemed to work as it populated in Real-time event reporting. However, after about an hour or two, the records were not showing in my Events Overview report (under Behavior). It's giving me a yellow alert at the top of the page "This report has been filtered to include only data where there are values for "Event Category" dimension.

How can I see past data for Event tracking I've set up?

<edited by a Community Manager as noted below>

 
NOTE: This post has been edited by a Community Manager - per Community Guidelines - in order to remove contact information which was most likely due to an email or mobile footer. Please be sure to remove this information in future replies.

Re: Event Tracking Code

Top Contributor
# 5
Top Contributor
Gday :-)
If it wasnt previously set up correctly to track events in the past, there wont be any past event data.
The events will only track going forward from the time they have been setup with the correct event tracking code.
Virtual pageviews will be tracked in the Behaviour > Site Content > All Pages report
Reporting latency is usually 4-24hrs. If you change the date range at the upper right to include the current day's date,
if the event data has been processed then it will show in the standard reports. If it hasn't been processed then you may have to
check again later, or tomorrow.
Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here