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

Old dc.js tag - is there any right order for statements?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi there, I'm beginning the migration process from dc.js to Universal Analytics but I want to make sure that everything in the "old" tag was set properly.

 

I'm wondering if there's a proper order of statements before the "trackpageview", and if using a single "push" for the whole tag is better than perform a push for every statement.

 

The tags run on different sub-domains (the purchase journey: www.xxxx.com pages ==> www2.xxxx.com ==> checkout.xxxx.com)

 

The tag looks like this:

 

_gaq.push(['_setAccount', 'UA-xxxxxx-x'],
['_setDomainName', 'xxx.com.br'],
['_addIgnoredRef', 'xxx.com.br'],
['_addIgnoredRef', 'www.xxx.com.br'],
['_addIgnoredRef', 'www2.xxx.com.br'],
['_addOrganic','google.com.br','q',true],
['_addIgnoredOrganic', 'www.xxx.com.br'],
['_setAllowLinker', true],
['_setCustomVar', 5, 'xxx', getCookie("xxx"), 2],
['_trackPageview']);

 

I'd appreciate your considerations about that.

 

Thank in advance,

2 Expert replyverified_user

Re: Old dc.js tag - is there any right order for statements?

Top Contributor
# 2
Top Contributor
Hi Felipe,

I'm pretty sure that the order is mostly deliberate - you should however keep trackpageview as last statement. Be sure to check up your set up with Google Tag Assistant Recordings [1] if everything is being transferred correctly.

Christoph

[1] https://support.google.com/analytics/answer/6280771?hl=en

Re: Old dc.js tag - is there any right order for statements?

Top Contributor
# 3
Top Contributor

Hi Felipe :-)

Some of what is in the old tag, is no longer configured in the tag.

Referral Exclusions, Custom Search Engines, and Organic Exclusions are no longer configured in the tracking code snippet
and are now configured via the GA Admin interface

Do you have the following link to the upgrade guide?
https://developers.google.com/analytics/devguides/collection/upgrade/reference/gajs-analyticsjs#over...

 

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