Analytics
4.9K members online now
4.9K 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

Changes in event tracking, while switching from classic to universal code

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I am switching from classic analytics code to universal analytics. I have a goal set up for my site where everytime user click on contact us (after passing all validations) an event gets fired and it is stored as a goal. 

 

What all changes I need to make in my current event tracking goal to get accurate data?

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Ravindra A
April 2017

Changes in event tracking, while switching from classic to universal code

Top Contributor
# 10
Top Contributor

Hi,

 

Your code is missing the type of the hit being sent. Please try the code below:

 

if (typeof ga != "undefined")
{

ga ('send', 'event', 'Enquiry', ‘Click’);
}

 

Let me know if it works.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

View solution in original post

Changes in event tracking, while switching from classic to universal code

Top Contributor
# 2
Top Contributor

Hi,

 

You need to update your event tracking code on your website. Please check the upgrade guide below:

https://developers.google.com/analytics/devguides/collection/upgrade/reference/gajs-analyticsjs

 

Go through the document carefully and check if you have any other features implemented that needs to be updated.

 

Once you're ready, your events should be tracked as before without making changes to your goal settings. You can use the Google Tag Assistant and/or GA Debugger Chrome extensions for debugging. Hope this helps, let me know if you have questions.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Changes in event tracking, while switching from classic to universal code

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thanks Arnold,

 

Can you guide how

 

 

 

if (typeof _gaq != "undefined")

 

{

 

_gaq.push(['_trackEvent', 'Enquiry', 'Click', '',1, true]);

 

}

 

will look after changing to Universal GA

 

Either- 

if (typeof ga != "undefined")

 
 

{

 

ga (['send', 'Trial', 'Click', '',1, true]);

 

}

 

Or

 

onClick="ga('send', 'event', 'Enquiry ', 'Click');"

Changes in event tracking, while switching from classic to universal code

Top Contributor
# 4
Top Contributor

Hi,

 

It will look like this:

 

if (typeof ga != "undefined")
{
ga('send', 'event', 'Enquiry ', 'Click');

}

 

Let me know if it works.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Changes in event tracking, while switching from classic to universal code

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Thanks Arnold. 

 

Appreciate your help. 

Changes in event tracking, while switching from classic to universal code

[ Edited ]
Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

Hi Arnold, 

 

Can you suggest how below mentioned classic event code will be modified to universal ?

 

 

 

if (cs)

 

{

 

_gaq.push(['_setCustomVar', 1, 'customer_status', cs, 1]);

 

}

Changes in event tracking, while switching from classic to universal code

A T
Participant ✭ ✭ ✭
# 7
A T
Participant ✭ ✭ ✭

Changes in event tracking, while switching from classic to universal code

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

The code which I have added for the successful contact form submission is not working-

code-

 

if (typeof ga != "undefined")
{

ga ('send', 'Enquiry', ‘Click’);
}

 

Can you suggest what's wrong?

Changes in event tracking, while switching from classic to universal code

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

The code which I have added for the successful contact form submission is not working-

code-

 

if (typeof ga != "undefined")
{

ga ('send', 'Enquiry', ‘Click’);
}

 

Can you suggest what's wrong?

Marked as Best Answer.
Solution
Accepted by topic author Ravindra A
April 2017

Changes in event tracking, while switching from classic to universal code

Top Contributor
# 10
Top Contributor

Hi,

 

Your code is missing the type of the hit being sent. Please try the code below:

 

if (typeof ga != "undefined")
{

ga ('send', 'event', 'Enquiry', ‘Click’);
}

 

Let me know if it works.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital