AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
4.2K members online now
4.2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Event tracking

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi, I am trying to use GA event tracking. I set my goal and implemented this code to my site:

<a href="https://epdm-tpo.at/wp-content/uploads/2016/03/01-Detailstreifen.pdf" onClick="ga('send', 'event', ‘PDFDownloads', 'Click', ’SEO', '0');" >PDS Detailstreifen</a>

But there is no evidence that the code works. 

Could somebody help me?

1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Peter S
February 2017

Event tracking

A T
Participant ✭ ✭ ✭
# 10
A T
Participant ✭ ✭ ✭

syntax issue.

 

onclick="ga('send', 'event', PDFDownloads', 'Click', SEO', '0');"

should be

onclick="ga('send', 'event', 'PDFDownloads', 'Click', 'SEO', '0');"

 

two apostrophe are wrong.

 

Also use: _gaq.push(['_trackEvent', 'PDFDownloads', 'Click', 'SEO', '0']);

 

Since your site is using GA classic through plugin.

View solution in original post

Event tracking

Follower ✭ ✭ ☆
# 2
Follower ✭ ✭ ☆

Hi Peter

 

Is your site following?
https://www.epdm-tpo.at/

 

If so, the site is not usign Universal Ver, but Classical Ver is used.

 

There are two choices.

1st, update the analysis code of the entire site to Universal Analytics.

2nd, Make event code of Classic Ver.

 

For the second method, try the code below.

 

_gaq.push(['_trackEvent', 'PDFDownloads', 'Click', ’SEO', '0']);

Event tracking

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

In GA, I have this:

This is the Universal Analytics tracking code for this property.

On my WP site I am using Plugin Google Analytics, which adds the required javascript to the site. 

In GA I can see traffic on my site. The only thing I dont see are the goals.

So I assume I use the correct code.

 

Event tracking

A T
Participant ✭ ✭ ✭
# 4
A T
Participant ✭ ✭ ✭

please paste a snapshot of your goal settings here.

Re: Event tracking

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Analytics_and_Inbox_—_admin_bevebe_sk__5 349_messages_.png

Event tracking

A T
Participant ✭ ✭ ✭
# 6
A T
Participant ✭ ✭ ✭

the value parameter in the image looks to be set as 'greater than' and the value you are sending is '0'

Event tracking

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Thnanks. I have corrected this mistake. Still no event if I open the PDF link. I have an active user on the site but no event. Is there a way how to check if the browser is sending the information?

Event tracking

A T
Participant ✭ ✭ ✭
# 8
A T
Participant ✭ ✭ ✭

please give page url on which link is present?

Event tracking

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

From here:

https://www.epdm-tpo.at/athos-epdm-membranen/

 

 

Sroll down to the first link: PDS Detailstreifen

Marked as Best Answer.
Solution
Accepted by topic author Peter S
February 2017

Event tracking

A T
Participant ✭ ✭ ✭
# 10
A T
Participant ✭ ✭ ✭

syntax issue.

 

onclick="ga('send', 'event', PDFDownloads', 'Click', SEO', '0');"

should be

onclick="ga('send', 'event', 'PDFDownloads', 'Click', 'SEO', '0');"

 

two apostrophe are wrong.

 

Also use: _gaq.push(['_trackEvent', 'PDFDownloads', 'Click', 'SEO', '0']);

 

Since your site is using GA classic through plugin.