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

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

Tracking fail on odd conditions with multiple trackers

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

In all my pages GA script correctly in the header. Everything works ok.
In some pages of my site I need to include a third party javascript that tracks the usage of a particular view.

Since yesterday I started seeing drops in ga access on those pages. I dig in the tracking script and found out that there is a second initialization of a GA analytics objects.

From time to time analytics on my GA account doesn't work, while other times work flawlessly.

By using GA analytics debug I see that when my tracking is not working it happens that oddly  the third party analytics code is initialized before mine and I have this error "Tracking script already loaded. Abandoning initialization." for my tracking. From what I understand, only the third party code has been triggered mine not.




It doesn't happen all the time but it happens a lot. How can I prevent a double initialization?
It seems that it is happening something like this:


What are your suggestions about it?



1 Expert replyverified_user

Re: Tracking fail on odd conditions with multiple trackers

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭
As an additional insight the third party told me that yesterday they moved theyr script from the old ga to universal analytics.

Re: Tracking fail on odd conditions with multiple trackers

Top Contributor
# 3
Top Contributor
Hi Simone,

It seems that they are still using classic analytics.

I tried a few times but I could not reproduce the double initialization issue yet. I'll let you know if I find something.

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: Tracking fail on odd conditions with multiple trackers

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
Hi Arnold,
mmm, I thought I had edited my reply to add an update but it didn't work apparently. They have switched back to classic analytics after I got in touch with them. It appears that the problem started once they migrated yesterday from classic to universal.
In the universal version of their tracking script they had an additional isogram function namespaced for them with mxmt instead of the classic ga like so

(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//', 'mxmt');