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

Enhanced ecommerce plugin not working

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

anyone can advise what's wrong with my script?

 

ga('create', 'UA-xxxx', 'auto',{'name': 'newTracker'});
ga('newTracker.require', 'ec');

ga('ec:addPromo', {
'id': 'xyz', // Promotion ID - Required Type: string
'name': 'test', // Promotion Name - Type: string
'creative':'', // Creative ad used for promotion - Type: string
'position':'' // Position of the creative ad - Type: string
});


ga('newTracker.send', 'pageview');

 

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Liz L
June 2016

Re: Enhanced ecommerce plugin not working

Top Contributor
# 2
Top Contributor

Hi Liz,

 

Please find the fixed code below.

ga('create', 'UA-xxxx', 'auto',{'name': 'newTracker'});
ga('newTracker.require', 'ec');
ga('newTracker.ec:addPromo', {
'id': 'xyz', // Promotion ID - Required Type: string
'name': 'test', // Promotion Name - Type: string
'creative':'', // Creative ad used for promotion - Type: string
'position':'' // Position of the creative ad - Type: string
});

ga('newTracker.send', 'pageview');

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

Marked as Best Answer.
Solution
Accepted by topic author Liz L
June 2016

Re: Enhanced ecommerce plugin not working

Top Contributor
# 2
Top Contributor

Hi Liz,

 

Please find the fixed code below.

ga('create', 'UA-xxxx', 'auto',{'name': 'newTracker'});
ga('newTracker.require', 'ec');
ga('newTracker.ec:addPromo', {
'id': 'xyz', // Promotion ID - Required Type: string
'name': 'test', // Promotion Name - Type: string
'creative':'', // Creative ad used for promotion - Type: string
'position':'' // Position of the creative ad - Type: string
});

ga('newTracker.send', 'pageview');

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

Re: Enhanced ecommerce plugin not working

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thanks Anrold! It works!